@intellias/menu 1.0.0 → 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.
- package/README.md +40 -11
- package/dist/css/1.css +20 -5
- package/dist/css/main.css +20 -2
- package/dist/index.html +9 -0
- package/dist/js/0.js +27 -27
- package/dist/js/1.js +27 -27
- package/dist/js/2.js +19 -19
- package/dist/js/3.js +16 -16
- package/dist/js/4.js +16 -16
- package/dist/js/5.js +16 -16
- package/dist/js/6.js +5 -5
- package/dist/js/main.js +653 -642
- package/dist/js/vue.js +2 -2
- package/package.json +99 -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/html/app.html +0 -19
- package/dist/html/styles.html +0 -1
- 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
package/mixins/IntemsMath.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
methods: {
|
|
3
|
-
round(value: number | string, precision?: number): number {
|
|
4
|
-
let num: number;
|
|
5
|
-
if (typeof value !== "number") {
|
|
6
|
-
num = parseFloat(value);
|
|
7
|
-
} else {
|
|
8
|
-
num = value;
|
|
9
|
-
}
|
|
10
|
-
return Number(num.toFixed(precision !== undefined ? precision : 2));
|
|
11
|
-
},
|
|
12
|
-
numberFormat(num: number): string {
|
|
13
|
-
return (Math.round(num * 100) / 100)
|
|
14
|
-
.toFixed(2)
|
|
15
|
-
.toString()
|
|
16
|
-
.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
17
|
-
},
|
|
18
|
-
bytesToSize(bytes: number): string {
|
|
19
|
-
const sizes = ["Bytes", "KB", "MB", "GB", "TB"];
|
|
20
|
-
if (bytes === 0) {
|
|
21
|
-
return "0 Byte";
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const i = Number(Math.floor(Math.log(bytes) / Math.log(1024)));
|
|
25
|
-
|
|
26
|
-
return `${(bytes / 1024 ** i).toFixed(1)} ${sizes[i]}`;
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
};
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { mapActions, mapGetters } from "vuex";
|
|
2
|
-
import moment from "moment";
|
|
3
|
-
import BaseRepository from "../../repositories/BaseRepository";
|
|
4
|
-
import { ResponseState } from "../../helpers/response/ResponseState";
|
|
5
|
-
import { DefaultContext } from "../../helpers/response/ResponseHelper";
|
|
6
|
-
import NotificationActionModel, {
|
|
7
|
-
ActionType,
|
|
8
|
-
ProceedTo,
|
|
9
|
-
RequestMethod,
|
|
10
|
-
} from "../../models/user/NotificationActionModel";
|
|
11
|
-
import {
|
|
12
|
-
confirmRejections,
|
|
13
|
-
NotificationCategory,
|
|
14
|
-
} from "../../models/user/NotificationModel";
|
|
15
|
-
import UserRepository from "../../repositories/UserRepository";
|
|
16
|
-
import { myOptions } from "../../wrapper";
|
|
17
|
-
|
|
18
|
-
const titlesMap = new Map([
|
|
19
|
-
[ActionType.reject, "Reject"],
|
|
20
|
-
[ActionType.confirm, "Confirm"],
|
|
21
|
-
[ActionType.view, "View"],
|
|
22
|
-
]);
|
|
23
|
-
export default {
|
|
24
|
-
mounted(): void {
|
|
25
|
-
this.baseRepository
|
|
26
|
-
.getResponseHelper()
|
|
27
|
-
.subscribe(ResponseState.Resolved, this.handleSuccess, DefaultContext);
|
|
28
|
-
this.baseRepository
|
|
29
|
-
.getResponseHelper()
|
|
30
|
-
.subscribe(ResponseState.Rejected, this.handleError, DefaultContext);
|
|
31
|
-
},
|
|
32
|
-
computed: {
|
|
33
|
-
...mapGetters("Config", ["config"]),
|
|
34
|
-
},
|
|
35
|
-
methods: {
|
|
36
|
-
...mapActions("User/Notifications", [
|
|
37
|
-
"read",
|
|
38
|
-
"markAsRead",
|
|
39
|
-
"process",
|
|
40
|
-
"markAsProcessed",
|
|
41
|
-
]),
|
|
42
|
-
submitAction(action: NotificationActionModel): Promise<void> {
|
|
43
|
-
if (
|
|
44
|
-
action.type === ActionType.reject &&
|
|
45
|
-
confirmRejections.includes(this.notification.category)
|
|
46
|
-
) {
|
|
47
|
-
this.actionProcessing = true;
|
|
48
|
-
const rejectionComponent = this.rejectionComponent();
|
|
49
|
-
|
|
50
|
-
this.$emit("rejection-component", {
|
|
51
|
-
rejectionComponent,
|
|
52
|
-
notification: this.notification,
|
|
53
|
-
});
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
this.request(action);
|
|
57
|
-
},
|
|
58
|
-
async request(action: NotificationActionModel): Promise<void> {
|
|
59
|
-
this.actionProcessing = true;
|
|
60
|
-
this.markAsRead(this.notification);
|
|
61
|
-
await this.baseRepository.request(
|
|
62
|
-
action.action,
|
|
63
|
-
action.method ? action.method : RequestMethod.put,
|
|
64
|
-
action.body
|
|
65
|
-
);
|
|
66
|
-
},
|
|
67
|
-
// eslint-disable-next-line complexity
|
|
68
|
-
async proceedToView(view: NotificationActionModel): Promise<void> {
|
|
69
|
-
if (this.notification.isNew) {
|
|
70
|
-
await this.read(this.notification);
|
|
71
|
-
}
|
|
72
|
-
const action = view.action ? view.action : view.url;
|
|
73
|
-
if (view.proceedTo === ProceedTo.remote) {
|
|
74
|
-
window.open(action, "_blank");
|
|
75
|
-
} else if (view.proceedTo === ProceedTo.career) {
|
|
76
|
-
window.location.href = `${this.config.careerSiteUrl}${action}`;
|
|
77
|
-
} else if (view.proceedTo === ProceedTo.old) {
|
|
78
|
-
window.location.href = `${this.config.oldSiteUrl}${action}`;
|
|
79
|
-
} else if (this.$router.currentRoute.path !== action) {
|
|
80
|
-
await this.$router.push(action.replace("api/", ""));
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
async handleSuccess(): Promise<void> {
|
|
84
|
-
myOptions.storeAdapter.Toasts.mutations.addMessage(
|
|
85
|
-
"The request has been processed."
|
|
86
|
-
);
|
|
87
|
-
myOptions.storeAdapter.Toasts.mutations.showAll();
|
|
88
|
-
this.markAsProcessed(this.notification);
|
|
89
|
-
this.actionProcessing = false;
|
|
90
|
-
},
|
|
91
|
-
async handleError(): Promise<void> {
|
|
92
|
-
myOptions.storeAdapter.Toasts.mutations.addWarning(
|
|
93
|
-
"Action failed. The request had been already processed."
|
|
94
|
-
);
|
|
95
|
-
myOptions.storeAdapter.Toasts.mutations.showAll();
|
|
96
|
-
|
|
97
|
-
await this.process(this.notification);
|
|
98
|
-
|
|
99
|
-
if (typeof this.errorAction === "function") {
|
|
100
|
-
this.errorAction();
|
|
101
|
-
}
|
|
102
|
-
this.actionProcessing = false;
|
|
103
|
-
},
|
|
104
|
-
rejectionComponent() {
|
|
105
|
-
if (this.notification.category === NotificationCategory.vacations) {
|
|
106
|
-
return () => import("./confirms/VacationRejectionConfirm.vue");
|
|
107
|
-
}
|
|
108
|
-
if (this.notification.category === NotificationCategory.unpaid_leave) {
|
|
109
|
-
return () => import("./confirms/UnpaidLeaveRejectionConfirm.vue");
|
|
110
|
-
}
|
|
111
|
-
if (this.notification.category === NotificationCategory.profile_update) {
|
|
112
|
-
return () => import("./confirms/AssetRejectionConfirm.vue");
|
|
113
|
-
}
|
|
114
|
-
if (this.notification.category === NotificationCategory.sick_leaves) {
|
|
115
|
-
return () => import("./confirms/SickLeaveRejectionConfirm.vue");
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return null;
|
|
119
|
-
},
|
|
120
|
-
isExpired(action: NotificationActionModel): boolean {
|
|
121
|
-
return action.expired_at && action.expired_at.isBefore(moment());
|
|
122
|
-
},
|
|
123
|
-
title(action: NotificationActionModel): string {
|
|
124
|
-
return action.title ? action.title : titlesMap.get(action.type);
|
|
125
|
-
},
|
|
126
|
-
},
|
|
127
|
-
data(): Record<string, unknown> {
|
|
128
|
-
return {
|
|
129
|
-
actionProcessing: false,
|
|
130
|
-
userRepository: new UserRepository(),
|
|
131
|
-
baseRepository: new BaseRepository(),
|
|
132
|
-
};
|
|
133
|
-
},
|
|
134
|
-
};
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<confirm
|
|
3
|
-
ref="rejectConfirm"
|
|
4
|
-
:title="'Rejection reason'"
|
|
5
|
-
:submit-btn="'Send'"
|
|
6
|
-
:reject-btn="'Cancel'"
|
|
7
|
-
@confirmed="confirmed"
|
|
8
|
-
@rejected="$emit('unsetRejection')"
|
|
9
|
-
>
|
|
10
|
-
<template #confirm-content>
|
|
11
|
-
<p>Please specify why you want to reject the item.</p>
|
|
12
|
-
<p
|
|
13
|
-
v-for="option in rejectOptions"
|
|
14
|
-
:key="option.value"
|
|
15
|
-
class="margin-bottom-5"
|
|
16
|
-
>
|
|
17
|
-
<label class="reject-reasons">
|
|
18
|
-
<input
|
|
19
|
-
class="with-gap"
|
|
20
|
-
v-model="rejectReason"
|
|
21
|
-
:value="option.value"
|
|
22
|
-
type="radio"
|
|
23
|
-
/>
|
|
24
|
-
<span>{{ option.title }}</span>
|
|
25
|
-
</label>
|
|
26
|
-
</p>
|
|
27
|
-
</template>
|
|
28
|
-
</confirm>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script lang="ts">
|
|
32
|
-
import Confirm from "../../../components/confirm/Confirm.vue";
|
|
33
|
-
import {
|
|
34
|
-
RejectAssetOptions,
|
|
35
|
-
RejectAssetReason,
|
|
36
|
-
} from "../../../models/AssetModel";
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
components: { Confirm },
|
|
40
|
-
mounted(): void {
|
|
41
|
-
this.$refs.rejectConfirm.open();
|
|
42
|
-
},
|
|
43
|
-
computed: {
|
|
44
|
-
rejectOptions(): Set<{ value: RejectAssetReason; title: string }> {
|
|
45
|
-
return RejectAssetOptions;
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
methods: {
|
|
49
|
-
confirmed(): void {
|
|
50
|
-
this.$emit("confirmed", this.rejectReason);
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
data(): Record<string, unknown> {
|
|
54
|
-
return {
|
|
55
|
-
rejectReason: RejectAssetReason.dont_need,
|
|
56
|
-
};
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<confirm
|
|
3
|
-
ref="rejectConfirm"
|
|
4
|
-
:title="'Sick leave rejection reason'"
|
|
5
|
-
:submit-btn="'Reject'"
|
|
6
|
-
:reject-btn="'Cancel'"
|
|
7
|
-
:comment="{
|
|
8
|
-
placeholder: 'Add comment (required)',
|
|
9
|
-
required: true
|
|
10
|
-
}"
|
|
11
|
-
@confirmed="confirmed"
|
|
12
|
-
@rejected="$emit('unsetRejection')"
|
|
13
|
-
><template #footer-description><div v-html="description" class="margin-top-10"></div></template></confirm>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import Confirm from '../../../components/confirm/Confirm.vue';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
components: { Confirm },
|
|
21
|
-
props: { description: String },
|
|
22
|
-
mounted(): void {
|
|
23
|
-
this.$refs.rejectConfirm.open();
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
confirmed(payload: { comment: string }): void {
|
|
27
|
-
this.$emit('confirmed', payload);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
</script>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<confirm
|
|
3
|
-
ref="rejectConfirm"
|
|
4
|
-
:title="'Unpaid leave rejection reason'"
|
|
5
|
-
:submit-btn="'Reject'"
|
|
6
|
-
:reject-btn="'Cancel'"
|
|
7
|
-
:comment="{
|
|
8
|
-
placeholder: 'Add comment (required)',
|
|
9
|
-
required: true
|
|
10
|
-
}"
|
|
11
|
-
@confirmed="confirmed"
|
|
12
|
-
@rejected="$emit('unsetRejection')"
|
|
13
|
-
><template #footer-description><div v-html="description" class="margin-top-10"></div></template></confirm>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import Confirm from '../../../components/confirm/Confirm.vue';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
components: { Confirm },
|
|
21
|
-
props: { description: String },
|
|
22
|
-
mounted(): void {
|
|
23
|
-
this.$refs.rejectConfirm.open();
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
confirmed(payload: { comment: string }): void {
|
|
27
|
-
this.$emit('confirmed', payload);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
</script>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<confirm
|
|
3
|
-
ref="rejectConfirm"
|
|
4
|
-
:title="'Vacation rejection reason'"
|
|
5
|
-
:submit-btn="'Reject'"
|
|
6
|
-
:reject-btn="'Cancel'"
|
|
7
|
-
:comment="{
|
|
8
|
-
placeholder: 'Add comment (required)',
|
|
9
|
-
required: true
|
|
10
|
-
}"
|
|
11
|
-
@confirmed="confirmed"
|
|
12
|
-
@rejected="$emit('unsetRejection')"
|
|
13
|
-
><template #footer-description><div v-html="description" class="margin-top-10"></div></template></confirm>
|
|
14
|
-
</template>
|
|
15
|
-
|
|
16
|
-
<script lang="ts">
|
|
17
|
-
import Confirm from '../../../components/confirm/Confirm.vue';
|
|
18
|
-
|
|
19
|
-
export default {
|
|
20
|
-
components: { Confirm },
|
|
21
|
-
props: { description: String },
|
|
22
|
-
mounted(): void {
|
|
23
|
-
this.$refs.rejectConfirm.open();
|
|
24
|
-
},
|
|
25
|
-
methods: {
|
|
26
|
-
confirmed(payload: { comment: string }): void {
|
|
27
|
-
this.$emit('confirmed', payload);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
</script>
|
package/models/AssetModel.ts
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import PublicInfoModel from "../models/user/PublicInfoModel";
|
|
2
|
-
import AsModel from "../helpers/model/decorators/AsModel";
|
|
3
|
-
import AssetRequestModel from "./AssetRequestModel";
|
|
4
|
-
import { Statuses } from "./StatusModel";
|
|
5
|
-
|
|
6
|
-
export enum AssetStatus {
|
|
7
|
-
waiting_for_confirmation = "waiting_for_confirmation",
|
|
8
|
-
confirmed = "confirmed",
|
|
9
|
-
return_is_expected = "return_is_expected",
|
|
10
|
-
processing = "processing",
|
|
11
|
-
}
|
|
12
|
-
export enum RejectAssetReason {
|
|
13
|
-
dont_need = "dont_need",
|
|
14
|
-
dont_have = "dont_have",
|
|
15
|
-
}
|
|
16
|
-
export const AssetStatusLabels = new Map([
|
|
17
|
-
[AssetStatus.waiting_for_confirmation, "Waiting for confirmation"],
|
|
18
|
-
[AssetStatus.confirmed, "Confirmed"],
|
|
19
|
-
[AssetStatus.return_is_expected, "Return is expected"],
|
|
20
|
-
[AssetStatus.processing, "Processing"],
|
|
21
|
-
]);
|
|
22
|
-
|
|
23
|
-
export const AssetStatusTypes = new Map([
|
|
24
|
-
[AssetStatus.waiting_for_confirmation, Statuses.danger],
|
|
25
|
-
[AssetStatus.confirmed, Statuses.success],
|
|
26
|
-
[AssetStatus.return_is_expected, Statuses.inactive],
|
|
27
|
-
[AssetStatus.processing, Statuses.warning],
|
|
28
|
-
]);
|
|
29
|
-
|
|
30
|
-
export const RejectAssetOptions = new Set([
|
|
31
|
-
{ value: RejectAssetReason.dont_need, title: "I don’t need it anymore." },
|
|
32
|
-
{ value: RejectAssetReason.dont_have, title: "I don’t have it." },
|
|
33
|
-
]);
|
|
34
|
-
@AsModel("employee", PublicInfoModel)
|
|
35
|
-
@AsModel("request", AssetRequestModel)
|
|
36
|
-
export default class AssetModel {
|
|
37
|
-
id = undefined as number;
|
|
38
|
-
employee = undefined as PublicInfoModel;
|
|
39
|
-
name = undefined as string;
|
|
40
|
-
inventory_number = undefined as number;
|
|
41
|
-
owner = undefined as string;
|
|
42
|
-
type = undefined as string;
|
|
43
|
-
status = undefined as AssetStatus;
|
|
44
|
-
request = undefined as AssetRequestModel;
|
|
45
|
-
selected = false as boolean;
|
|
46
|
-
|
|
47
|
-
get statusLabel(): string {
|
|
48
|
-
return AssetStatusLabels.has(this.status)
|
|
49
|
-
? AssetStatusLabels.get(this.status)
|
|
50
|
-
: "";
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
get statusType(): Statuses {
|
|
54
|
-
return AssetStatusTypes.has(this.status)
|
|
55
|
-
? AssetStatusTypes.get(this.status)
|
|
56
|
-
: Statuses.inactive;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
get isConfirmed(): boolean {
|
|
60
|
-
return (
|
|
61
|
-
this.status === AssetStatus.confirmed ||
|
|
62
|
-
this.status === AssetStatus.return_is_expected
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
get confirmed(): boolean {
|
|
67
|
-
return this.status === AssetStatus.confirmed;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
get isUnconfirmed(): boolean {
|
|
71
|
-
return (
|
|
72
|
-
this.status === AssetStatus.waiting_for_confirmation ||
|
|
73
|
-
this.status === AssetStatus.processing
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
get processing(): boolean {
|
|
78
|
-
return this.status === AssetStatus.processing;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Moment } from 'moment';
|
|
2
|
-
import DateTime from '../helpers/model/decorators/DateTime';
|
|
3
|
-
|
|
4
|
-
export enum AssetRequestStatus {
|
|
5
|
-
requested = 'requested',
|
|
6
|
-
processing = 'processing',
|
|
7
|
-
done = 'done'
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@DateTime('date')
|
|
11
|
-
export default class AssetRequestModel {
|
|
12
|
-
status = undefined as AssetRequestStatus;
|
|
13
|
-
comment = undefined as string;
|
|
14
|
-
request_key = undefined as string;
|
|
15
|
-
service_desc_url = undefined as string;
|
|
16
|
-
date = undefined as Moment;
|
|
17
|
-
|
|
18
|
-
get processing(): boolean {
|
|
19
|
-
return this.status === AssetRequestStatus.processing;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get notActive(): boolean {
|
|
23
|
-
return this.status !== AssetRequestStatus.requested && this.status !== AssetRequestStatus.processing;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/models/ConfigModel.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface WiFiNetwork {
|
|
2
|
-
ssid: string;
|
|
3
|
-
password: string;
|
|
4
|
-
show_qr_code: boolean;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export default class ConfigModel {
|
|
8
|
-
oldSiteUrl = undefined as string;
|
|
9
|
-
liteSiteUrl = undefined as string;
|
|
10
|
-
careerSiteUrl = undefined as string;
|
|
11
|
-
sickness_id = undefined as number;
|
|
12
|
-
vacation_id = undefined as number;
|
|
13
|
-
unpaid_leave_id = undefined as number;
|
|
14
|
-
vacation_compensation_id = undefined as number;
|
|
15
|
-
git_branch_name = undefined as string;
|
|
16
|
-
intems_version = undefined as number;
|
|
17
|
-
here_board_available_date = undefined as string;
|
|
18
|
-
release_note_version = undefined as number;
|
|
19
|
-
wi_fi_networks = [] as Array<WiFiNetwork>;
|
|
20
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Moment } from "moment";
|
|
2
|
-
import DateTime from "../helpers/model/decorators/DateTime";
|
|
3
|
-
|
|
4
|
-
export enum Status {
|
|
5
|
-
General = "General",
|
|
6
|
-
Freelancer = "Freelancer",
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
@DateTime("start_date")
|
|
10
|
-
@DateTime("end_date")
|
|
11
|
-
export default class EmployeeStartEndDateModel {
|
|
12
|
-
employee_id = undefined as number;
|
|
13
|
-
start_date = undefined as Moment;
|
|
14
|
-
end_date = undefined as Moment | null;
|
|
15
|
-
status = Status.General;
|
|
16
|
-
}
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
export const EmploymentTypeLabels = [
|
|
2
|
-
{
|
|
3
|
-
key: "2,3,4",
|
|
4
|
-
name: "Umowa o prace",
|
|
5
|
-
},
|
|
6
|
-
{
|
|
7
|
-
key: 5,
|
|
8
|
-
name: "PL: B2B - 20",
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
key: 6,
|
|
12
|
-
name: "PL: B2B - 26",
|
|
13
|
-
},
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export enum EmploymentType {
|
|
17
|
-
ua_b2b = "ua_b2b",
|
|
18
|
-
pl_umowa_o_prace_20 = "pl_umowa_o_prace_20",
|
|
19
|
-
pl_umowa_o_prace_26 = "pl_umowa_o_prace_26",
|
|
20
|
-
pl_umowa_o_prace_first_employment = "pl_umowa_o_prace_first_employment",
|
|
21
|
-
pl_b2b_20 = "pl_b2b_20",
|
|
22
|
-
pl_b2b_26 = "pl_b2b_26",
|
|
23
|
-
xx_b2b = "xx_b2b",
|
|
24
|
-
ua_b2b_vacation_contract = "ua_b2b_vacation_contract",
|
|
25
|
-
pl_b2b_0 = "pl_b2b_0",
|
|
26
|
-
hr_employment = "hr_employment",
|
|
27
|
-
bg_employment = "bg_employment",
|
|
28
|
-
xx_employment = "xx_employment",
|
|
29
|
-
es_employment = "es_employment",
|
|
30
|
-
pt_b2b = "pt_b2b",
|
|
31
|
-
de_employment = "de_employment",
|
|
32
|
-
hr_b2b = "hr_b2b",
|
|
33
|
-
pt_employment = "pt_employment",
|
|
34
|
-
us_employment = "us_employment",
|
|
35
|
-
in_employment = "in_employment",
|
|
36
|
-
co_employment = "co_employment",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const UNLIMITED = 365;
|
|
40
|
-
|
|
41
|
-
export default class EmploymentTypeModel {
|
|
42
|
-
id = undefined as string;
|
|
43
|
-
name = undefined as string;
|
|
44
|
-
machine_name = undefined as EmploymentType;
|
|
45
|
-
vacation_per_year = undefined as number;
|
|
46
|
-
accrue_vacation = undefined as number;
|
|
47
|
-
sickleaves_without_note_per_year = undefined as number;
|
|
48
|
-
sickleaves_per_year = undefined as number;
|
|
49
|
-
unpaid_leaves_limit = undefined as number;
|
|
50
|
-
calendar_id = undefined as number;
|
|
51
|
-
country_code = undefined as string;
|
|
52
|
-
|
|
53
|
-
get canReportVacation(): boolean {
|
|
54
|
-
return this.vacation_per_year !== 0 || this.accrue_vacation !== 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
get canReportSickness(): boolean {
|
|
58
|
-
return this.sickleaves_per_year !== 0;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get isLimitedSickness(): boolean {
|
|
62
|
-
return this.canReportSickness && this.sickleaves_per_year !== UNLIMITED;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
get canReportSicknessWithoutNote(): boolean {
|
|
66
|
-
return this.sickleaves_without_note_per_year !== 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
get isLimitedSicknessWithoutNote(): boolean {
|
|
70
|
-
return (
|
|
71
|
-
this.canReportSicknessWithoutNote &&
|
|
72
|
-
this.sickleaves_without_note_per_year !== UNLIMITED
|
|
73
|
-
);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
get canReportSomeSickness(): boolean {
|
|
77
|
-
return this.canReportSickness || this.canReportSicknessWithoutNote;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
get hasAnySicknessBalance(): boolean {
|
|
81
|
-
return this.isLimitedSickness || this.isLimitedSicknessWithoutNote;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
get canReportUnpaidLeave(): boolean {
|
|
85
|
-
return this.unpaid_leaves_limit > 0;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
get canReportAnyLeaves(): boolean {
|
|
89
|
-
return (
|
|
90
|
-
this.canReportVacation ||
|
|
91
|
-
this.canReportSomeSickness ||
|
|
92
|
-
this.canReportUnpaidLeave
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
}
|
package/models/LogoutModel.ts
DELETED
package/models/Model.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as ModelHelper from "../helpers/model/ModelHelper";
|
|
2
|
-
|
|
3
|
-
export default abstract class Model {
|
|
4
|
-
fill(source: Partial<this>) {
|
|
5
|
-
ModelHelper.updateProperties(this, source);
|
|
6
|
-
}
|
|
7
|
-
clone(): this {
|
|
8
|
-
const cloned = new (<any>this.constructor)();
|
|
9
|
-
cloned.fill(this);
|
|
10
|
-
return cloned;
|
|
11
|
-
}
|
|
12
|
-
}
|
package/models/ModuleOptions.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
export enum ProjectName {
|
|
2
|
-
Lite = "Lite",
|
|
3
|
-
IntelliHub = "IntelliHub",
|
|
4
|
-
ManagersPortal = "ManagersPortal",
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface Submenus {
|
|
8
|
-
subMenuList: keyable;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export interface Helpers {
|
|
12
|
-
getUrlPathByName: Function;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface keyable {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export interface MenuOptions {
|
|
20
|
-
projectName: ProjectName;
|
|
21
|
-
storeAdapter: keyable;
|
|
22
|
-
subMenus?: Submenus;
|
|
23
|
-
helperFunctions: Helpers;
|
|
24
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import PublicLocationModel from "./location/PublicLocationModel";
|
|
2
|
-
import AsModel from "../helpers/model/decorators/AsModel";
|
|
3
|
-
import EmploymentTypeModel from "./EmploymentTypeModel";
|
|
4
|
-
import LocalTimezoneHistoryModel from "./timezones/LocalTimezoneHistoryModel";
|
|
5
|
-
import TimezoneModel from "./timezones/TimezoneModel";
|
|
6
|
-
|
|
7
|
-
@AsModel("employment_type", EmploymentTypeModel)
|
|
8
|
-
@AsModel("location", PublicLocationModel)
|
|
9
|
-
export default class PublicInfoModel {
|
|
10
|
-
username = undefined as string;
|
|
11
|
-
email = undefined as string;
|
|
12
|
-
employee_id = undefined as number;
|
|
13
|
-
first_name = undefined as string;
|
|
14
|
-
last_name = undefined as string;
|
|
15
|
-
full_name = undefined as string;
|
|
16
|
-
full_name_reversed = undefined as string;
|
|
17
|
-
position = null as string;
|
|
18
|
-
full_name_with_position = null as string;
|
|
19
|
-
location = undefined as PublicLocationModel;
|
|
20
|
-
avatar_url = undefined as string;
|
|
21
|
-
thumbnail_url = undefined as string;
|
|
22
|
-
employment_type_country_id = undefined as number;
|
|
23
|
-
timezone = undefined as TimezoneModel;
|
|
24
|
-
local_timezone_history = undefined as Array<LocalTimezoneHistoryModel>;
|
|
25
|
-
employment_type = undefined as EmploymentTypeModel;
|
|
26
|
-
|
|
27
|
-
getFullName(): string {
|
|
28
|
-
return `${this.first_name} ${this.last_name}`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
getTimezone(): string {
|
|
32
|
-
return this.timezone.iana_identifier;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
equals(employee: PublicInfoModel): boolean {
|
|
36
|
-
return this.employee_id === employee.employee_id;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export default class PublicLocationModel {
|
|
2
|
-
city = undefined as string;
|
|
3
|
-
office = undefined as string;
|
|
4
|
-
floor = undefined as string;
|
|
5
|
-
area = undefined as string;
|
|
6
|
-
locationImage = undefined as string;
|
|
7
|
-
locationLink = undefined as string;
|
|
8
|
-
|
|
9
|
-
fullLocation() {
|
|
10
|
-
let location: string;
|
|
11
|
-
|
|
12
|
-
location = this.city;
|
|
13
|
-
|
|
14
|
-
if (this.office) {
|
|
15
|
-
location += `, ${this.office}`;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
if (this.floor) {
|
|
19
|
-
location += `, ${this.floor}`;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (this.area) {
|
|
23
|
-
location += this.area;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return location;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
get image(): string | null {
|
|
30
|
-
return this.locationImage ? this.locationImage : null;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get link(): string | null {
|
|
34
|
-
return this.locationLink ? this.locationLink : null;
|
|
35
|
-
}
|
|
36
|
-
}
|