@campxdev/shared 1.10.31 → 1.10.33

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.31",
3
+ "version": "1.10.33",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -24,7 +24,14 @@ import Table from '../Tables/BasicTable/Table'
24
24
  import DepartmentFilter from './DepartmentFilter'
25
25
 
26
26
  interface ApplicationProfileProps {
27
- application: 'exams' | 'square' | 'payments' | 'enroll_x' | 'hostels' | 'hrms'
27
+ application:
28
+ | 'exams'
29
+ | 'square'
30
+ | 'payments'
31
+ | 'enroll_x'
32
+ | 'hostels'
33
+ | 'hrms'
34
+ | 'commute_x'
28
35
  title: string
29
36
  permissions?: {
30
37
  add: string
@@ -6,6 +6,7 @@ import {
6
6
  hostelSmall,
7
7
  paySmall,
8
8
  peopleSmall,
9
+ commuteSmall,
9
10
  } from './assets'
10
11
 
11
12
  const origins = {
@@ -80,13 +81,13 @@ export const applications = [
80
81
  icon: hostelSmall,
81
82
  description: 'Manage Hostels in the Campus',
82
83
  },
83
- // {
84
- // title: 'CommuteX',
85
- // key: 'commute',
86
- // path: isDevelopment ? origins.commute.dev : origins.commute.prod,
87
- // icon: commuteSmall,
88
- // description: 'Manage Commute in the Campus',
89
- // },
84
+ {
85
+ title: 'CommuteX',
86
+ key: 'commute',
87
+ path: isDevelopment ? origins.commute.dev : origins.commute.prod,
88
+ icon: commuteSmall,
89
+ description: 'Manage Commute in the Campus',
90
+ },
90
91
 
91
92
  {
92
93
  title: 'PeopleX',
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react'
2
2
  import { Helmet as ReactHelmet } from 'react-helmet'
3
+ import { isDevelopment } from '../../constants'
3
4
 
4
5
  const isLocalHost = process.env.NODE_ENV === 'development'
5
6
 
@@ -22,6 +23,12 @@ const freshDeskInnerHtml = `
22
23
 
23
24
  `
24
25
 
26
+ const getbeamerInnerHtml = `
27
+ var beamer_config = {
28
+ product_id : "ThEQzGKL56777"
29
+ };
30
+ `
31
+
25
32
  const getInnerHtml = (user: any) => {
26
33
  if (isLocalHost) {
27
34
  return ''
@@ -75,6 +82,16 @@ export default function Helmet({
75
82
  {extraMetaTags}
76
83
  <link rel="icon" href={favicon} />
77
84
  <link rel="apple-touch-icon" href={favicon} />
85
+ {isDevelopment && (
86
+ <>
87
+ <script>{getbeamerInnerHtml}</script>
88
+ <script
89
+ type="text/javascript"
90
+ src="https://app.getbeamer.com/js/beamer-embed.js"
91
+ ></script>
92
+ </>
93
+ )}
94
+
78
95
  {/* {!isLocalHost && (
79
96
  <script
80
97
  type="text/javascript"
@@ -36,6 +36,7 @@ const ApplicationObj = {
36
36
  exams: 'exams',
37
37
  hostel: 'hostels',
38
38
  people: 'hrms',
39
+ commute: 'commute_x',
39
40
  }
40
41
  const checkIsAdmin = (user) => {
41
42
  let subDomain = window.location.host.split('.')?.slice(-3)[0]
@@ -594,6 +594,28 @@ export enum Permission {
594
594
  // Settings
595
595
  CAN_MANAGE_PAYMENTS_SETTINGS = 'can_payments_manage_settings',
596
596
 
597
+ // Commute X
598
+ // manage hostels profile_permissions
599
+ CAN_MANAGE_COMMUTE_X_PROFILE_PERMISSIONS_VIEW = 'can_manage_commute_x_profile_permissions_view',
600
+ CAN_MANAGE_COMMUTE_X_PROFILE_PERMISSIONS_ADD = 'can_manage_commute_x_profile_permissions_add',
601
+ CAN_MANAGE_COMMUTE_X_PROFILE_PERMISSIONS_EDIT = 'can_manage_commute_x_profile_permissions_edit',
602
+ CAN_MANAGE_COMMUTE_X_PROFILE_PERMISSIONS_DELETE = 'can_manage_commute_x_profile_permissions_delete',
603
+
604
+ //registrations
605
+ CAN_COMMUTE_X_REGISTRATIONS_VIEW = 'can_commute_x_registrations_view',
606
+ CAN_COMMUTE_X_REGISTRATIONS_EDIT = 'can_commute_x_registrations_edit',
607
+ CAN_COMMUTE_X_REGISTRATIONS_DELETE = 'can_commute_x_registrations_delete',
608
+ CAN_COMMUTE_X_REGISTRATIONS_ADD = 'can_commute_x_registrations_add',
609
+
610
+ //routes
611
+ CAN_COMMUTE_X_ROUTES_VIEW = 'can_commute_x_routes_view',
612
+ CAN_COMMUTE_X_ROUTES_EDIT = 'can_commute_x_routes_edit',
613
+ CAN_COMMUTE_X_ROUTES_DELETE = 'can_commute_x_routes_delete',
614
+ CAN_COMMUTE_X_ROUTES_ADD = 'can_commute_x_routes_add',
615
+
616
+ //settings
617
+ CAN_MANAGE_COMMUTE_X_SETTINGS = 'can_commute_x_manage_settings',
618
+
597
619
  //Hostels
598
620
 
599
621
  // manage hostels profile_permissions