@campxdev/shared 1.10.9 → 1.10.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/shared",
3
- "version": "1.10.9",
3
+ "version": "1.10.11",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -36,7 +36,7 @@ import Table from '../Tables/BasicTable/Table'
36
36
  import DeprartmentFilter from './DepartmentFilter'
37
37
 
38
38
  interface ApplicationProfileProps {
39
- application: 'exams' | 'square' | 'payments' | 'enroll_x' | 'hostels'
39
+ application: 'exams' | 'square' | 'payments' | 'enroll_x' | 'hostels' | 'hrms'
40
40
  title: string
41
41
  permissions?: {
42
42
  add: string
@@ -1,12 +1,11 @@
1
1
  import { isDevelopment } from '../../../constants'
2
2
  import {
3
3
  campxSquareSmall,
4
+ enrollSmall,
4
5
  examsSmall,
5
6
  hostelSmall,
6
7
  paySmall,
7
8
  peopleSmall,
8
- commuteSmall,
9
- enrollSmall,
10
9
  } from './assets'
11
10
 
12
11
  const origins = {
@@ -88,15 +87,12 @@ export const applications = [
88
87
  // icon: commuteSmall,
89
88
  // description: 'Manage Commute in the Campus',
90
89
  // },
91
- ...(isDevelopment
92
- ? [
93
- {
94
- title: 'PeopleX',
95
- key: 'hrms',
96
- path: isDevelopment ? origins.people.dev : origins.people.prod,
97
- icon: peopleSmall,
98
- description: 'Manage People in the Campus',
99
- },
100
- ]
101
- : []),
90
+
91
+ {
92
+ title: 'PeopleX',
93
+ key: 'hrms',
94
+ path: isDevelopment ? origins.people.dev : origins.people.prod,
95
+ icon: peopleSmall,
96
+ description: 'Manage People in the Campus',
97
+ },
102
98
  ]
@@ -1,7 +1,6 @@
1
1
  import { AxiosError } from 'axios'
2
2
  import { useEffect, useState } from 'react'
3
3
  import { toast } from 'react-toastify'
4
- import { institutions } from '../components/Institutions/services'
5
4
  import axios from '../config/axios'
6
5
  import { isDevelopment } from '../constants'
7
6
  import { urlTenantKey } from '../contexts/Providers'
@@ -36,6 +35,7 @@ const ApplicationObj = {
36
35
  payments: 'payments',
37
36
  exams: 'exams',
38
37
  hostel: 'hostels',
38
+ hrms: 'hrms',
39
39
  }
40
40
  const checkIsAdmin = (user) => {
41
41
  let subDomain = window.location.host.split('.')?.slice(-3)[0]
@@ -1057,6 +1057,71 @@ export enum Permission {
1057
1057
  CAN_EXAM_TIME_SLOTS_DELETE = 'can_exam_time_slots_delete',
1058
1058
 
1059
1059
  CAN_ADMIN_VIEW = 'can_admin_view',
1060
+
1061
+ //HRMS
1062
+
1063
+ //Profiles
1064
+ CAN_MANAGE_HRMS_PROFILE_PERMISSIONS_VIEW = 'can_manage_hrms_profile_permissions_view',
1065
+ CAN_MANAGE_HRMS_PROFILE_PERMISSIONS_ADD = 'can_manage_hrms_profile_permissions_add',
1066
+ CAN_MANAGE_HRMS_PROFILE_PERMISSIONS_EDIT = 'can_manage_hrms_profile_permissions_edit',
1067
+ CAN_MANAGE_HRMS_PROFILE_PERMISSIONS_DELETE = 'can_manage_hrms_profile_permissions_delete',
1068
+
1069
+ //Roles
1070
+ CAN_MANAGE_HRMS_ROLES_VIEW = 'can_manage_hrms_roles_view',
1071
+ CAN_MANAGE_HRMS_ROLES_ADD = 'can_manage_hrms_roles_add',
1072
+ CAN_MANAGE_HRMS_ROLES_EDIT = 'can_manage_hrms_roles_edit',
1073
+ CAN_MANAGE_HRMS_ROLES_DELETE = 'can_manage_hrms_roles_delete',
1074
+
1075
+ //Employees
1076
+ CAN_MANAGE_EMPLOYEES_VIEW = 'can_manage_employees_view',
1077
+ CAN_MANAGE_EMPLOYEES_IMPORT = 'can_manage_employees_import',
1078
+ CAN_MANAGE_EMPLOYEES_ADD = 'can_manage_employees_add',
1079
+ CAN_MANAGE_EMPLOYEES_EDIT = 'can_manage_employees_edit',
1080
+
1081
+ //Groups
1082
+ CAN_MANAGE_GROUPS_VIEW = 'can_manage_groups_view',
1083
+ CAN_MANAGE_GROUPS_ADD = 'can_manage_groups_add',
1084
+ CAN_MANAGE_GROUPS_EDIT = 'can_manage_groups_edit',
1085
+
1086
+ //Departments
1087
+ CAN_MANAGE_DEPARTMENTS_VIEW = 'can_manage_departments_view',
1088
+ CAN_MANAGE_DEPARTMENTS_ADD = 'can_manage_departments_add',
1089
+ CAN_MANAGE_DEPARTMENTS_EDIT = 'can_manage_departments_edit',
1090
+
1091
+ //Designations
1092
+ CAN_MANAGE_DESIGNATIONS_VIEW = 'can_manage_designations_view',
1093
+ CAN_MANAGE_DESIGNATIONS_ADD = 'can_manage_designations_add',
1094
+ CAN_MANAGE_DESIGNATIONS_EDIT = 'can_manage_designations_edit',
1095
+
1096
+ //Locations
1097
+ CAN_MANAGE_LOCATIONS_VIEW = 'can_manage_locations_view',
1098
+ CAN_MANAGE_LOCATIONS_ADD = 'can_manage_locations_add',
1099
+ CAN_MANAGE_LOCATIONS_EDIT = 'can_manage_locations_edit',
1100
+
1101
+ //Leave Types
1102
+ CAN_MANAGE_LEAVE_TYPES_VIEW = 'can_manage_leave_types_view',
1103
+ CAN_MANAGE_LEAVE_TYPES_ADD = 'can_manage_leave_types_add',
1104
+ CAN_MANAGE_LEAVE_TYPES_EDIT = 'can_manage_leave_types_edit',
1105
+
1106
+ //Leave Balances
1107
+ CAN_MANAGE_HRMS_LEAVE_BALANCES_VIEW = 'can_manage_hrms_leave_balances_view',
1108
+ CAN_MANAGE_HRMS_LEAVE_BALANCES_IMPORT = 'can_manage_hrms_leave_balances_import',
1109
+ CAN_MANAGE_HRMS_LEAVE_BALANCES_EDIT = 'can_manage_hrms_leave_balances_edit',
1110
+
1111
+ //Time Sheet
1112
+ CAN_MANAGE_HRMS_TIME_SHEET_VIEW = 'can_manage_hrms_time_sheet_view',
1113
+ CAN_MANAGE_HRMS_TIME_SHEET_IMPORT = 'can_manage_hrms_time_sheet_import',
1114
+ CAN_MANAGE_HRMS_TIME_SHEET_EDIT = 'can_manage_hrms_time_sheet_edit',
1115
+
1116
+ //Expense Types
1117
+ CAN_MANAGE_EXPENSE_TYPES_VIEW = 'can_manage_expense_types_view',
1118
+ CAN_MANAGE_EXPENSE_TYPES_ADD = 'can_manage_expense_types_add',
1119
+ CAN_MANAGE_EXPENSE_TYPES_EDIT = 'can_manage_expense_types_edit',
1120
+
1121
+ //Overtime
1122
+ CAN_MANAGE_OVERTIME_VIEW = 'can_manage_overtime_view',
1123
+ CAN_MANAGE_OVERTIME_ADD = 'can_manage_overtime_add',
1124
+ CAN_MANAGE_OVERTIME_EDIT = 'can_manage_overtime_edit',
1060
1125
  }
1061
1126
 
1062
1127
  export interface IPermissions {