sevago-sso-fe 1.0.4 → 1.0.7
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 +18 -19
- package/dist/App.d.ts +1 -0
- package/dist/apis/auth/auth.api.d.ts +9 -0
- package/dist/apis/auth/auth.enum.d.ts +16 -0
- package/dist/apis/auth/auth.interface.d.ts +50 -0
- package/dist/apis/auth/index.d.ts +5 -0
- package/dist/apis/index.d.ts +4 -0
- package/dist/apis/notification/index.d.ts +6 -0
- package/dist/apis/notification/notification.api.d.ts +12 -0
- package/dist/apis/notification/notification.entities.d.ts +17 -0
- package/dist/apis/notification/notification.enum.d.ts +26 -0
- package/dist/apis/notification/notification.interface.d.ts +33 -0
- package/dist/apis/org-unit/index.d.ts +2 -0
- package/dist/apis/org-unit/org-unit.entities.d.ts +41 -0
- package/dist/apis/org-unit/org-unit.enum.d.ts +11 -0
- package/dist/apis/user/index.d.ts +6 -0
- package/dist/apis/user/user.api.d.ts +17 -0
- package/dist/apis/user/user.entities.d.ts +161 -0
- package/dist/apis/user/user.enum.d.ts +304 -0
- package/dist/apis/user/user.interface.d.ts +81 -0
- package/dist/assets/icon/icon-left.d.ts +3 -0
- package/dist/assets/icon/icon-right.d.ts +3 -0
- package/dist/common/config/axios.config.d.ts +1 -0
- package/dist/common/config/firebase.config.d.ts +3 -0
- package/dist/common/config/index.d.ts +3 -0
- package/dist/common/config/socket.config.d.ts +19 -0
- package/dist/common/constant/apps.constant.d.ts +2 -0
- package/dist/common/constant/index.d.ts +7 -0
- package/dist/common/constant/mode.constant.d.ts +266 -0
- package/dist/common/constant/opacity.constant.d.ts +103 -0
- package/dist/common/constant/reg-exp.constant.d.ts +1 -0
- package/dist/common/constant/style.constant.d.ts +113 -0
- package/dist/common/constant/tree.constant.d.ts +12 -0
- package/dist/common/constant/typography.constant.d.ts +457 -0
- package/dist/common/enums/app-category.enum.d.ts +22 -0
- package/dist/common/enums/country.enum.d.ts +7 -0
- package/dist/common/enums/file-type.enum.d.ts +4 -0
- package/dist/common/enums/index.d.ts +6 -0
- package/dist/common/enums/mode.enum.d.ts +4 -0
- package/dist/common/enums/order-type.enum.d.ts +4 -0
- package/dist/common/enums/payment-method.enum.d.ts +7 -0
- package/dist/common/index.d.ts +5 -0
- package/dist/common/interfaces/base-item.interface.d.ts +8 -0
- package/dist/common/interfaces/change-event-custom.interface.d.ts +6 -0
- package/dist/common/interfaces/error.interface.d.ts +5 -0
- package/dist/common/interfaces/index.d.ts +6 -0
- package/dist/common/interfaces/page-options.interface.d.ts +15 -0
- package/dist/common/interfaces/res-list.interface.d.ts +7 -0
- package/dist/common/interfaces/route.interface.d.ts +12 -0
- package/dist/common/utils/find-current-access.helper.d.ts +1 -0
- package/dist/common/utils/index.d.ts +6 -0
- package/dist/common/utils/other/app.utils.d.ts +2 -0
- package/dist/common/utils/other/get-limit-line-css.utils.d.ts +2 -0
- package/dist/common/utils/other/index.d.ts +2 -0
- package/dist/common/utils/string.utils.d.ts +10 -0
- package/dist/common/utils/time.utils.d.ts +13 -0
- package/dist/components/app-grid/app-grid.component.d.ts +19 -0
- package/dist/components/app-grid/index.d.ts +1 -0
- package/dist/components/avatar/avatar-enum.enum.d.ts +10 -0
- package/dist/components/avatar/avatar-user-info.element.d.ts +15 -0
- package/dist/components/avatar/avatar.element.d.ts +9 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar-user/avatar-user.component.d.ts +4 -0
- package/dist/components/avatar-user/index.d.ts +1 -0
- package/dist/components/bell/bell.component.d.ts +4 -0
- package/dist/components/bell/index.d.ts +1 -0
- package/dist/components/elements/button/button.element.d.ts +10 -0
- package/dist/components/elements/button/index.d.ts +1 -0
- package/dist/components/elements/icon/icon-button.element.d.ts +10 -0
- package/dist/components/elements/icon/icon-content.element.d.ts +15 -0
- package/dist/components/elements/icon/icon.element.d.ts +11 -0
- package/dist/components/elements/icon/index.d.ts +3 -0
- package/dist/components/elements/image/image-content-caption.component.d.ts +14 -0
- package/dist/components/elements/image/image-name-time.component.d.ts +9 -0
- package/dist/components/elements/image/image.element.d.ts +12 -0
- package/dist/components/elements/image/image.enum.d.ts +5 -0
- package/dist/components/elements/image/index.d.ts +4 -0
- package/dist/components/elements/index.d.ts +7 -0
- package/dist/components/elements/radio/index.d.ts +2 -0
- package/dist/components/elements/radio/radio-group.element.d.ts +16 -0
- package/dist/components/elements/radio/radio.element.d.ts +7 -0
- package/dist/components/elements/text-field/index.d.ts +2 -0
- package/dist/components/elements/text-field/text-field-label.element.d.ts +9 -0
- package/dist/components/elements/text-field/text-field.element.d.ts +13 -0
- package/dist/components/elements/tooltip/index.d.ts +1 -0
- package/dist/components/elements/tooltip/tooltip-on-click.element.d.ts +7 -0
- package/dist/components/elements/typography/index.d.ts +1 -0
- package/dist/components/elements/typography/typography-content-caption.component.d.ts +10 -0
- package/dist/components/empty/empty.component.d.ts +4 -0
- package/dist/components/empty/index.d.ts +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/loading/index.d.ts +1 -0
- package/dist/components/loading/loading.component.d.ts +8 -0
- package/dist/components/logo/index.d.ts +1 -0
- package/dist/components/logo/logo.component.d.ts +10 -0
- package/dist/components/motion/index.d.ts +1 -0
- package/dist/components/motion/motion-box.component.d.ts +14 -0
- package/dist/components/styles/index.d.ts +2 -0
- package/dist/components/styles/stack.style.d.ts +19 -0
- package/dist/components/styles/typography.style.d.ts +1 -0
- package/dist/components/time-ago/index.d.ts +2 -0
- package/dist/components/time-ago/time-ago-content.component.d.ts +7 -0
- package/dist/components/time-ago/time-ago.component.d.ts +6 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/use-apps.hook.d.ts +11 -0
- package/dist/hooks/use-snackbar.hook.d.ts +19 -0
- package/dist/hooks/use-tag-selector.hook.d.ts +25 -0
- package/dist/hooks/use-update-current-access.hook.d.ts +1 -0
- package/dist/hooks/use-version-check.hook.d.ts +3 -0
- package/dist/index.cjs.js +32315 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.esm.js +32299 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/layouts/auth.layout.d.ts +5 -0
- package/dist/layouts/dashboard.layout.d.ts +5 -0
- package/dist/layouts/default.layout.d.ts +5 -0
- package/dist/layouts/index.d.ts +3 -0
- package/dist/main.d.ts +0 -0
- package/dist/pages/auth/auth.constant.d.ts +35 -0
- package/dist/pages/auth/auth.enum.d.ts +6 -0
- package/dist/pages/auth/auth.interface.d.ts +7 -0
- package/dist/pages/auth/auth.page.d.ts +4 -0
- package/dist/pages/auth/index.d.ts +5 -0
- package/dist/pages/auth/parts/index.d.ts +1 -0
- package/dist/pages/auth/parts/otp/index.d.ts +1 -0
- package/dist/pages/auth/parts/otp/otp.part.d.ts +6 -0
- package/dist/pages/dashboard/dashboard.page.d.ts +5 -0
- package/dist/pages/dashboard/index.d.ts +3 -0
- package/dist/pages/dashboard/parts/index.d.ts +1 -0
- package/dist/pages/dashboard/parts/monitor.part.d.ts +2 -0
- package/dist/pages/dashboard/screen/index.d.ts +1 -0
- package/dist/pages/dashboard/screen/system-monitor/index.d.ts +1 -0
- package/dist/pages/dashboard/screen/system-monitor/system-monitor.screen.d.ts +2 -0
- package/dist/pages/error/error.page.d.ts +4 -0
- package/dist/pages/index.d.ts +6 -0
- package/dist/pages/not-found/not-found.page.d.ts +4 -0
- package/dist/redux/account/account.action.d.ts +22 -0
- package/dist/redux/account/account.interface.d.ts +13 -0
- package/dist/redux/account/account.slice.d.ts +4 -0
- package/dist/redux/account/index.d.ts +5 -0
- package/dist/redux/index.d.ts +5 -0
- package/dist/redux/slices/index.d.ts +1 -0
- package/dist/redux/slices/remaining-weight.slice.d.ts +7 -0
- package/dist/redux/store.interface.d.ts +11 -0
- package/dist/redux/store.redux.d.ts +15 -0
- package/dist/redux/system/index.d.ts +2 -0
- package/dist/redux/system/system.action.d.ts +2 -0
- package/dist/redux/system/system.interface.d.ts +4 -0
- package/dist/redux/system/system.slice.d.ts +4 -0
- package/dist/router/index.d.ts +4 -0
- package/dist/router/render.route.d.ts +3 -0
- package/dist/router/route.constant.d.ts +278 -0
- package/dist/router/route.enum.d.ts +4 -0
- package/dist/router/route.routes.d.ts +2 -0
- package/dist/scripts/generate.script.d.ts +0 -0
- package/package.json +5 -5
- package/dist/assets/index-Ck8Rqlmw.css +0 -1
- package/dist/assets/index-RCni0Nq0.js +0 -1183
- package/dist/index.html +0 -21
package/README.md
CHANGED
|
@@ -36,14 +36,14 @@ import React from 'react';
|
|
|
36
36
|
import { Provider } from 'react-redux';
|
|
37
37
|
import { PersistGate } from 'redux-persist/integration/react';
|
|
38
38
|
import { BrowserRouter } from 'react-router-dom';
|
|
39
|
-
import {
|
|
39
|
+
import { SystemMonitorScreen, store, persistor } from 'sevago-sso-fe';
|
|
40
40
|
|
|
41
41
|
function App() {
|
|
42
42
|
return (
|
|
43
43
|
<Provider store={store}>
|
|
44
44
|
<PersistGate loading={null} persistor={persistor}>
|
|
45
45
|
<BrowserRouter>
|
|
46
|
-
<
|
|
46
|
+
<SystemMonitorScreen />
|
|
47
47
|
</BrowserRouter>
|
|
48
48
|
</PersistGate>
|
|
49
49
|
</Provider>
|
|
@@ -133,10 +133,17 @@ await notificationApi.subscribeTopic({ token });
|
|
|
133
133
|
## API Reference
|
|
134
134
|
|
|
135
135
|
### Components
|
|
136
|
-
- `
|
|
137
|
-
- `
|
|
138
|
-
- `
|
|
139
|
-
- `
|
|
136
|
+
- `AppGrid`
|
|
137
|
+
- `AvatarElement`
|
|
138
|
+
- `AvatarUserInfo`
|
|
139
|
+
- `AvatarUserComponent`
|
|
140
|
+
- `BellComponent`
|
|
141
|
+
- `EmptyComponent`
|
|
142
|
+
- `LoadingComponent`
|
|
143
|
+
- `LogoComponent`
|
|
144
|
+
- `MotionBox`
|
|
145
|
+
- `TimeAgoContentComponent`
|
|
146
|
+
- `TimeAgoComponent`
|
|
140
147
|
|
|
141
148
|
### Hooks
|
|
142
149
|
- `useSnackbar()` - Snackbar notifications
|
|
@@ -154,15 +161,16 @@ await notificationApi.subscribeTopic({ token });
|
|
|
154
161
|
### Redux Store
|
|
155
162
|
- `store` - Redux store instance
|
|
156
163
|
- `persistor` - Redux persist instance
|
|
157
|
-
- `
|
|
158
|
-
- `
|
|
164
|
+
- `remainingWeightSlice ` - Redux remainingWeightSlice
|
|
165
|
+
- `account` - login/logout/resetPassword/refreshToken/subscribeTopic/unsubscribeTopic/changeNotificationCount/changeSidebarCount/updateAccount/getAccount/updatePositionOrgUnit/updateCurrentAccess
|
|
166
|
+
- `system` - changeMode(GlobalSystemState)
|
|
159
167
|
|
|
160
168
|
### Utilities
|
|
161
169
|
- `renderRoutes` - Route rendering utility
|
|
162
170
|
- `routeConstants` - Route constants
|
|
163
171
|
- `STYLE` - Style constants
|
|
164
172
|
- `MODE` - Theme modes
|
|
165
|
-
- `timeUtils` - Time utility functions
|
|
173
|
+
- `timeUtils` - Time utility functions (getTimeAgo, getDateTime, getDate, checkNowYear,getMonthRangeForYear, getDayOffsetPx, isSameDateTime, getTimeDate, isDateString)
|
|
166
174
|
|
|
167
175
|
## Configuration
|
|
168
176
|
|
|
@@ -229,13 +237,4 @@ To contribute to this library:
|
|
|
229
237
|
3. Run development server: `npm run dev`
|
|
230
238
|
4. Build library: `npm run build:lib`
|
|
231
239
|
5. Test the build: `npm run preview`
|
|
232
|
-
|
|
233
|
-
## Changelog
|
|
234
|
-
|
|
235
|
-
### v1.0.0
|
|
236
|
-
- Initial release
|
|
237
|
-
- Complete SSO authentication system
|
|
238
|
-
- Material-UI components
|
|
239
|
-
- Redux state management
|
|
240
|
-
- Firebase notifications
|
|
241
|
-
- TypeScript support
|
|
240
|
+
## Changelog
|
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function App(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ForgotPasswordDto, LoginDto, LogoutDto, RefreshTokenDto, ResetPasswordDto, ResponseAuth, ResponseFcm, SubscribeUnsubscribeTopicDto, TokenObject, VerifyOtpDto } from './auth.interface';
|
|
2
|
+
export declare const login: (body: LoginDto) => Promise<ResponseAuth>;
|
|
3
|
+
export declare const logout: (body: LogoutDto) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
4
|
+
export declare const forgotPassword: (body: ForgotPasswordDto) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
5
|
+
export declare const verifyOtp: (body: VerifyOtpDto) => Promise<TokenObject>;
|
|
6
|
+
export declare const resetPassword: (body: ResetPasswordDto) => Promise<ResponseAuth>;
|
|
7
|
+
export declare const refreshToken: (body: RefreshTokenDto) => Promise<Omit<ResponseAuth, "user">>;
|
|
8
|
+
export declare const subscribeTopic: (body: SubscribeUnsubscribeTopicDto) => Promise<ResponseFcm>;
|
|
9
|
+
export declare const unsubscribeTopic: (body: SubscribeUnsubscribeTopicDto) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare enum LogoutType {
|
|
2
|
+
THIS_DEVICE = "Thi\u1EBFt b\u1ECB",
|
|
3
|
+
ALL_DEVICES = "T\u1EA5t c\u1EA3 thi\u1EBFt b\u1ECB"
|
|
4
|
+
}
|
|
5
|
+
export declare enum RefreshTokenStatus {
|
|
6
|
+
USED = "Used",
|
|
7
|
+
UNUSED = "Unused"
|
|
8
|
+
}
|
|
9
|
+
export declare enum ResetPasswordType {
|
|
10
|
+
OTP = "Otp",
|
|
11
|
+
EMAIL = "Email"
|
|
12
|
+
}
|
|
13
|
+
export declare enum ForgotPasswordType {
|
|
14
|
+
PHONE = "Phone",
|
|
15
|
+
EMAIL = "Email"
|
|
16
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { User } from '../user/user.entities';
|
|
2
|
+
import { LogoutType, ResetPasswordType, ForgotPasswordType } from './auth.enum';
|
|
3
|
+
export interface ForgotPasswordDto {
|
|
4
|
+
phone?: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
type: ForgotPasswordType;
|
|
7
|
+
}
|
|
8
|
+
export interface GenerateTokenVerifyEmailDto {
|
|
9
|
+
email: string;
|
|
10
|
+
password: string;
|
|
11
|
+
}
|
|
12
|
+
export interface LoginDto {
|
|
13
|
+
emailOrPhone: string;
|
|
14
|
+
password: string;
|
|
15
|
+
}
|
|
16
|
+
export interface LogoutDto {
|
|
17
|
+
type: LogoutType;
|
|
18
|
+
refreshToken?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface RefreshTokenDto {
|
|
21
|
+
refreshToken: string;
|
|
22
|
+
}
|
|
23
|
+
export interface RegisterDto {
|
|
24
|
+
email: string;
|
|
25
|
+
password: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ResetPasswordDto {
|
|
28
|
+
token: string;
|
|
29
|
+
password: string;
|
|
30
|
+
type: ResetPasswordType;
|
|
31
|
+
}
|
|
32
|
+
export interface SubscribeUnsubscribeTopicDto {
|
|
33
|
+
fcmToken: string;
|
|
34
|
+
}
|
|
35
|
+
export interface VerifyOtpDto {
|
|
36
|
+
phone: string;
|
|
37
|
+
otp: string;
|
|
38
|
+
}
|
|
39
|
+
export interface ResponseAuth {
|
|
40
|
+
user: User;
|
|
41
|
+
accessToken: string;
|
|
42
|
+
refreshToken: string;
|
|
43
|
+
sidebarCountObj: Record<string, number>;
|
|
44
|
+
}
|
|
45
|
+
export interface ResponseFcm {
|
|
46
|
+
fcmToken: string;
|
|
47
|
+
}
|
|
48
|
+
export interface TokenObject {
|
|
49
|
+
token: string;
|
|
50
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export * from './notification.api';
|
|
2
|
+
export * from './notification.entities';
|
|
3
|
+
export * from './notification.enum';
|
|
4
|
+
export * from './notification.interface';
|
|
5
|
+
import * as notificationApiMethods from './notification.api';
|
|
6
|
+
export declare const notificationApi: typeof notificationApiMethods;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ResList } from '../../common/interfaces/res-list.interface';
|
|
2
|
+
import { Notification, NotificationSetting } from './notification.entities';
|
|
3
|
+
import { GetListNotificationDto, GetListNotificationSettingDto, UpdateNotificationDto, UpdateNotificationSettingDto } from './notification.interface';
|
|
4
|
+
export interface ResSubscribeTopic {
|
|
5
|
+
fcmToken: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const updateNotification: (body: UpdateNotificationDto) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
8
|
+
export declare const getListNotification: (params: GetListNotificationDto) => Promise<ResList<Notification>>;
|
|
9
|
+
export declare const updateNotificationSetting: (id: string, body: UpdateNotificationSettingDto) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
10
|
+
export declare const getListNotificationSetting: (params: GetListNotificationSettingDto) => Promise<ResList<NotificationSetting>>;
|
|
11
|
+
export declare const subscribeTopicByToken: (token: string) => Promise<ResSubscribeTopic>;
|
|
12
|
+
export declare const unSubscribeTopicByToken: (token: string) => Promise<import('axios').AxiosResponse<any, any, {}>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { BaseEntity } from '../../common/interfaces/base-item.interface';
|
|
2
|
+
import { User } from '../user/user.entities';
|
|
3
|
+
import { NotificationType, NotificationStatus } from './notification.enum';
|
|
4
|
+
export interface NotificationSetting extends BaseEntity {
|
|
5
|
+
type: NotificationType;
|
|
6
|
+
isReceive: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface Notification extends BaseEntity {
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
createdById?: string;
|
|
12
|
+
status: NotificationStatus;
|
|
13
|
+
type: NotificationType;
|
|
14
|
+
path: string;
|
|
15
|
+
userId: string;
|
|
16
|
+
user: User;
|
|
17
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum NotificationType {
|
|
2
|
+
SYSTEM = "H\u1EC7 th\u1ED1ng",
|
|
3
|
+
APPLICATION = "\u1EE8ng tuy\u1EC3n",
|
|
4
|
+
INTERVIEW_BOOKING = "\u0110\u1EB7t l\u1ECBch ph\u1ECFng v\u1EA5n",
|
|
5
|
+
HIRED = "\u0110\u00E3 tuy\u1EC3n d\u1EE5ng",
|
|
6
|
+
RECRUITMENT_REQUEST = "Y\u00EAu c\u1EA7u tuy\u1EC3n d\u1EE5ng"
|
|
7
|
+
}
|
|
8
|
+
export declare enum UpdateNotificationAction {
|
|
9
|
+
VIEW_ONE = "View one",
|
|
10
|
+
VIEW_ALL = "View all",
|
|
11
|
+
DELETE_VIEWED = "Delete viewed",
|
|
12
|
+
DELETE_ALL = "Delete all",
|
|
13
|
+
DELETE_ONE = "Delete one"
|
|
14
|
+
}
|
|
15
|
+
export declare enum NotificationStatus {
|
|
16
|
+
VIEWED = "\u0110\u00E3 xem",
|
|
17
|
+
NOT_VIEWED = "Ch\u01B0a xem"
|
|
18
|
+
}
|
|
19
|
+
export declare enum keyNotification {
|
|
20
|
+
PROPOSAL_APPROVAL = "proposal_approval",// phê duyệt đề xuất
|
|
21
|
+
JOB_APPROVAL = "job_approval",// tuyển dụng
|
|
22
|
+
JOB = "job",// yêu cầu tuyển dụng
|
|
23
|
+
MOVEMENT = "movement",// di chuyển
|
|
24
|
+
PROJECT_TASK = "project_task",// nhiệm vụ dự án
|
|
25
|
+
RECRUITMENT = "recruitment"
|
|
26
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { PageOptionsDto } from '../../common/interfaces/page-options.interface';
|
|
2
|
+
import { NotificationType, UpdateNotificationAction, NotificationStatus } from './notification.enum';
|
|
3
|
+
export interface GetListNotificationSettingDto extends PageOptionsDto {
|
|
4
|
+
type?: NotificationType;
|
|
5
|
+
isReceive?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface GetListNotificationDto extends PageOptionsDto {
|
|
8
|
+
type?: NotificationType;
|
|
9
|
+
status?: NotificationStatus;
|
|
10
|
+
}
|
|
11
|
+
export interface UpdateNotificationSettingDto {
|
|
12
|
+
isReceive: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateNotificationDto {
|
|
15
|
+
updateNotificationAction: UpdateNotificationAction;
|
|
16
|
+
id?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface NotificationProposalValue {
|
|
19
|
+
total: number;
|
|
20
|
+
job: number;
|
|
21
|
+
movement: number;
|
|
22
|
+
project_task: number;
|
|
23
|
+
}
|
|
24
|
+
export interface JobApproval {
|
|
25
|
+
total: number;
|
|
26
|
+
recruitment: number;
|
|
27
|
+
}
|
|
28
|
+
export interface NotificationSummaryItem {
|
|
29
|
+
movement: number;
|
|
30
|
+
approve_list: number;
|
|
31
|
+
approve: number;
|
|
32
|
+
recruitment: number;
|
|
33
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { BaseEntity } from '../../common/interfaces/base-item.interface';
|
|
2
|
+
import { SubManager, User } from '../user/user.entities';
|
|
3
|
+
import { OrgUnitStatus, OrgUnitType } from './org-unit.enum';
|
|
4
|
+
export interface OrgUnit extends BaseEntity {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
type: OrgUnitType;
|
|
9
|
+
status: OrgUnitStatus;
|
|
10
|
+
totalMember: number;
|
|
11
|
+
parentId: string;
|
|
12
|
+
parent: OrgUnit;
|
|
13
|
+
children: OrgUnit[];
|
|
14
|
+
managerId: string;
|
|
15
|
+
manager: User;
|
|
16
|
+
permission: boolean;
|
|
17
|
+
projectTaskId?: string;
|
|
18
|
+
divisionId?: string;
|
|
19
|
+
subManagersParent: SubManagersParent[];
|
|
20
|
+
subManagers: SubManager[];
|
|
21
|
+
}
|
|
22
|
+
export interface SubManagersParent {
|
|
23
|
+
orgUnit: OrgUnit;
|
|
24
|
+
}
|
|
25
|
+
export interface OrgUnitIdDetail extends OrgUnit {
|
|
26
|
+
orgUnit: OrgUnit;
|
|
27
|
+
users: User[];
|
|
28
|
+
}
|
|
29
|
+
export interface GetOrgUnitIdDto extends OrgUnit {
|
|
30
|
+
userOrgUnitPositions: {
|
|
31
|
+
id: string;
|
|
32
|
+
user: {
|
|
33
|
+
id: string;
|
|
34
|
+
name: string;
|
|
35
|
+
};
|
|
36
|
+
position: {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
};
|
|
40
|
+
}[];
|
|
41
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare enum OrgUnitType {
|
|
2
|
+
BOARD_OF_DIRECTORS = 1,// Ban Giám đốc
|
|
3
|
+
DIVISION = 3,// Khối
|
|
4
|
+
DEPARTMENT = 5,// Phòng ban
|
|
5
|
+
PART = 7,// Bộ phận
|
|
6
|
+
TEAM = 9
|
|
7
|
+
}
|
|
8
|
+
export declare enum OrgUnitStatus {
|
|
9
|
+
ACTIVE = "Ho\u1EA1t \u0111\u1ED9ng",
|
|
10
|
+
INACTIVE = "Kh\u00F4ng ho\u1EA1t \u0111\u1ED9ng"
|
|
11
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ResList } from '../../common/interfaces/res-list.interface';
|
|
2
|
+
import { User } from './user.entities';
|
|
3
|
+
import { CreateUserDto, GetListUserDto, UpdateAccountDto, UpdateUserDto } from './user.interface';
|
|
4
|
+
export declare const createUser: (body: CreateUserDto) => Promise<User>;
|
|
5
|
+
export declare const updateUser: (id: string, body: UpdateUserDto) => Promise<User>;
|
|
6
|
+
export declare const updateAccount: (body: UpdateAccountDto) => Promise<User>;
|
|
7
|
+
export declare const deleteUser: (id: string) => Promise<void>;
|
|
8
|
+
export declare const getListUser: (body: GetListUserDto) => Promise<ResList<User>>;
|
|
9
|
+
export declare const getListUserRelations: (body: GetListUserDto) => Promise<ResList<User>>;
|
|
10
|
+
export declare const getUser: (id: string) => Promise<User>;
|
|
11
|
+
export declare const getUserInformationHistory: (id: string) => Promise<User>;
|
|
12
|
+
export declare const getUserOrgUnitPositionById: (userId: string) => Promise<User>;
|
|
13
|
+
export declare const getUserGenerateNextUserCode: () => Promise<string>;
|
|
14
|
+
export declare const getUserNearestManagers: () => Promise<User[]>;
|
|
15
|
+
export declare const getUserByOrgUnit: (body: {
|
|
16
|
+
orgUnitIds: string[];
|
|
17
|
+
}) => Promise<User[]>;
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { BaseEntity } from '../../common/interfaces/base-item.interface';
|
|
2
|
+
import { OrgUnit } from '../org-unit/org-unit.entities';
|
|
3
|
+
import { Gender, UserBankName, UserCitizenIdentificationPlace, UserCultureLevel, UserEducationLevel, UserEthnic, UserLevel, UserMaritalStatus, UserOfficialStatus, UserReligion, UserResignType, UserStatus, UserType } from './user.enum';
|
|
4
|
+
export interface UserOrgUnitPosition extends BaseEntity {
|
|
5
|
+
userId: string;
|
|
6
|
+
user: User;
|
|
7
|
+
positionId: string;
|
|
8
|
+
position: any;
|
|
9
|
+
orgUnitId: string;
|
|
10
|
+
orgUnit: any;
|
|
11
|
+
orgUnits: any[];
|
|
12
|
+
id: string;
|
|
13
|
+
subManagers: SubManager[];
|
|
14
|
+
positionType: any;
|
|
15
|
+
manager: string;
|
|
16
|
+
isOldData?: boolean;
|
|
17
|
+
orgUnitData?: any;
|
|
18
|
+
}
|
|
19
|
+
export interface avatarUser {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
url: string;
|
|
23
|
+
}
|
|
24
|
+
export interface User extends BaseEntity {
|
|
25
|
+
code: string;
|
|
26
|
+
name: string;
|
|
27
|
+
gender: Gender;
|
|
28
|
+
dateOnboard: Date;
|
|
29
|
+
email: string;
|
|
30
|
+
internalPhones: string[];
|
|
31
|
+
phone: string;
|
|
32
|
+
level: UserLevel;
|
|
33
|
+
birthday: Date;
|
|
34
|
+
address: string;
|
|
35
|
+
tempAddress: string;
|
|
36
|
+
educationLevel: UserEducationLevel;
|
|
37
|
+
major: string;
|
|
38
|
+
cultureLevel: UserCultureLevel;
|
|
39
|
+
dateWorkEnd: Date;
|
|
40
|
+
resignType: UserResignType;
|
|
41
|
+
resignReason: string;
|
|
42
|
+
cccd: string;
|
|
43
|
+
citizenIdentificationDate: Date;
|
|
44
|
+
citizenIdentificationPlace: UserCitizenIdentificationPlace;
|
|
45
|
+
passportNumber: string;
|
|
46
|
+
passportDate: Date;
|
|
47
|
+
passportPlace: string;
|
|
48
|
+
passportValidityDate: Date;
|
|
49
|
+
ethnicity: UserEthnic;
|
|
50
|
+
religion: UserReligion;
|
|
51
|
+
maritalStatus: UserMaritalStatus;
|
|
52
|
+
taxCode: string;
|
|
53
|
+
socialInsuranceNumber: string;
|
|
54
|
+
bankAccountNumber: string;
|
|
55
|
+
bankBranch: string;
|
|
56
|
+
bankName: UserBankName;
|
|
57
|
+
tenure: number;
|
|
58
|
+
relativeName: string;
|
|
59
|
+
relativePhone: string;
|
|
60
|
+
url: string;
|
|
61
|
+
type: UserType;
|
|
62
|
+
status: UserStatus;
|
|
63
|
+
password: string;
|
|
64
|
+
officialStatus: UserOfficialStatus;
|
|
65
|
+
userOrgUnitPositions: UserOrgUnitPosition[];
|
|
66
|
+
managedOrgUnits: OrgUnit[];
|
|
67
|
+
subManagers: SubManager[];
|
|
68
|
+
managers?: {
|
|
69
|
+
[key: string]: OrgUnitData;
|
|
70
|
+
};
|
|
71
|
+
orgUnits?: any[];
|
|
72
|
+
position?: any;
|
|
73
|
+
permission: boolean;
|
|
74
|
+
numberPermission?: number;
|
|
75
|
+
codeClock: string;
|
|
76
|
+
}
|
|
77
|
+
interface Manager {
|
|
78
|
+
orgUnitId: string;
|
|
79
|
+
orgUnitName: string;
|
|
80
|
+
managerId: string;
|
|
81
|
+
managerName: string;
|
|
82
|
+
managerEmail: string;
|
|
83
|
+
level: number;
|
|
84
|
+
url: string;
|
|
85
|
+
type: number;
|
|
86
|
+
}
|
|
87
|
+
interface OrgUnitData {
|
|
88
|
+
orgUnitName: string;
|
|
89
|
+
positionName: string;
|
|
90
|
+
nearestManagers: Manager[];
|
|
91
|
+
}
|
|
92
|
+
interface PositionValueDto {
|
|
93
|
+
id: string;
|
|
94
|
+
orgName: string;
|
|
95
|
+
positionName: string;
|
|
96
|
+
}
|
|
97
|
+
export interface OrgUnitValueDto {
|
|
98
|
+
id: string;
|
|
99
|
+
orgName: string;
|
|
100
|
+
positionName: string;
|
|
101
|
+
divisionName: string;
|
|
102
|
+
departmentName: string;
|
|
103
|
+
partName: string;
|
|
104
|
+
teamsName: string[];
|
|
105
|
+
}
|
|
106
|
+
export interface MovementValueDto {
|
|
107
|
+
position?: PositionValueDto;
|
|
108
|
+
orgUnit?: OrgUnitValueDto;
|
|
109
|
+
user?: User;
|
|
110
|
+
}
|
|
111
|
+
export interface UserMovementOrgUnitSimple {
|
|
112
|
+
id: string;
|
|
113
|
+
name: string;
|
|
114
|
+
type: number;
|
|
115
|
+
}
|
|
116
|
+
export interface UserMovementPositionSimple {
|
|
117
|
+
id: string;
|
|
118
|
+
name: string;
|
|
119
|
+
}
|
|
120
|
+
export interface SubManager {
|
|
121
|
+
id?: string;
|
|
122
|
+
name?: string;
|
|
123
|
+
type?: number;
|
|
124
|
+
orgUnitId?: string;
|
|
125
|
+
orgUnitParentId?: string;
|
|
126
|
+
orgUnit?: any;
|
|
127
|
+
user?: User;
|
|
128
|
+
}
|
|
129
|
+
export interface UserHistoryItem {
|
|
130
|
+
id: string;
|
|
131
|
+
updatedAt: string;
|
|
132
|
+
createdBy: {
|
|
133
|
+
id: string;
|
|
134
|
+
name: string;
|
|
135
|
+
url: string;
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
export interface UserMovementHistoryData {
|
|
139
|
+
userMovementHistory: UserHistoryItem;
|
|
140
|
+
changes: UserMovementHistoryChange[];
|
|
141
|
+
}
|
|
142
|
+
export interface UserMovementHistoryChange {
|
|
143
|
+
field: string;
|
|
144
|
+
label: string;
|
|
145
|
+
reasonOld: string;
|
|
146
|
+
reasonNew: string;
|
|
147
|
+
dateAppointmentOld: string;
|
|
148
|
+
dateAppointmentNew: string;
|
|
149
|
+
fileOld: string;
|
|
150
|
+
fileNew: string;
|
|
151
|
+
}
|
|
152
|
+
export interface UserInformationHistoryChange {
|
|
153
|
+
field: string;
|
|
154
|
+
old: string;
|
|
155
|
+
new: string;
|
|
156
|
+
}
|
|
157
|
+
export interface UserInformationHistoryData {
|
|
158
|
+
userHistory: UserHistoryItem;
|
|
159
|
+
changes: UserInformationHistoryChange[];
|
|
160
|
+
}
|
|
161
|
+
export {};
|