@campxdev/shared 1.10.62 → 1.10.64

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.62",
3
+ "version": "1.10.64",
4
4
  "main": "./exports.ts",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
@@ -1,23 +1,26 @@
1
1
  import { Tab } from '@mui/material'
2
2
  import { ChangeEvent, ReactNode, useEffect, useState } from 'react'
3
- import { StyledComponentWrapper, StyledContainer, StyledTabs } from './styles'
4
3
  import ErrorBoundary from '../ErrorBoundary'
4
+ import { StyledComponentWrapper, StyledContainer, StyledTabs } from './styles'
5
5
 
6
6
  export interface TabsContainerProps {
7
7
  tabs: {
8
8
  key: string
9
9
  label: string
10
10
  component: ReactNode
11
+ highlight?: boolean
11
12
  }[]
12
13
  size?: 'small' | 'medium'
13
14
  conatinerVariant?: 'box' | 'page'
14
15
  onTabChange?: (tabKey: string) => void
16
+ isMobile?: boolean
15
17
  }
16
18
 
17
19
  export default function TabsContainer({
18
20
  tabs,
19
21
  size = 'small',
20
22
  conatinerVariant = 'box',
23
+ isMobile = false,
21
24
  onTabChange,
22
25
  }: TabsContainerProps) {
23
26
  const [currentTab, setCurrentTab] = useState(tabs[0].key)
@@ -41,9 +44,16 @@ export default function TabsContainer({
41
44
  scrollButtons="auto"
42
45
  textColor="primary"
43
46
  indicatorColor="primary"
47
+ isMobile={isMobile}
44
48
  >
45
49
  {tabs.map((tab) => (
46
- <Tab key={tab.key} label={tab.label} value={tab.key} />
50
+ <Tab
51
+ key={tab.key}
52
+ label={tab.label}
53
+ value={tab.key}
54
+ icon={tab.highlight ? <span>{'.'}</span> : null}
55
+ iconPosition="end"
56
+ />
47
57
  ))}
48
58
  </StyledTabs>
49
59
  <StyledComponentWrapper containerVariant={conatinerVariant}>
@@ -3,18 +3,29 @@ import { Box, Stack, styled, Tabs } from '@mui/material'
3
3
  export const StyledTabs = styled(Tabs)<{
4
4
  size: 'small' | 'medium'
5
5
  containerVariant?: 'page' | 'box'
6
- }>(({ theme, size, containerVariant }) => ({
6
+ isMobile?: false | true
7
+ }>(({ theme, size, containerVariant, isMobile }) => ({
7
8
  borderTopRightRadius: '10px',
8
9
  borderTopLeftRadius: '10px',
9
10
  background: theme.palette.secondary.light,
10
- minHeight: '60px',
11
+ minHeight: isMobile ? '30px' : '60px',
11
12
  paddingLeft: '15px',
12
13
  '& .MuiTabs-indicator': {
13
14
  backgroundColor: theme.palette.common.yellow,
15
+ [theme.breakpoints.down('sm')]: {
16
+ backgroundColor: theme.palette.primary.main,
17
+ },
18
+ },
19
+ '& span': {
20
+ color: theme.palette.error.main,
21
+ fontSize: '20px',
22
+ marginTop: '-20px',
23
+ marginLeft: '3px !important',
14
24
  },
15
25
  '& .MuiTabs-flexContainer': {
16
26
  height: '100%',
17
27
  alignItems: 'end',
28
+ justifyContent: isMobile ? 'center' : 'flex-start',
18
29
  },
19
30
  '& .MuiTab-root': {
20
31
  textTransform: 'none',
@@ -749,6 +749,14 @@ export enum Permission {
749
749
  STUDENTS_ALLOTMENT = 'can_students_allotment',
750
750
  STUDENT_INFO_VIEW = 'can_student_info_view',
751
751
 
752
+ //EmailReportCronJobs
753
+ EMAIL_REPORT_CRON_JOBS_VIEW='can_email_report_cron_jobs_view',
754
+ EMAIL_REPORT_CRON_JOBS_ADD='can_email_report_cron_jobs_add',
755
+ EMAIL_REPORT_CRON_JOBS_EDIT='can_email_report_cron_jobs_edit',
756
+ EMAIL_REPORT_CRON_JOBS_DELETE='can_email_report_cron_jobs_delete',
757
+
758
+
759
+
752
760
  // Subjects
753
761
  SUBJECTS_VIEW = 'can_subjects_view',
754
762
  SUBJECTS_ADD = 'can_subjects_add',