wca-designsystem 1.0.54 → 1.0.56
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,27 +1,27 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import * as S from './styles'
|
|
3
|
-
import { theme } from '../../../styles/theme'
|
|
4
|
-
import { Box, Flex } from '@mantine/core'
|
|
5
|
-
import IconeBotao from '../../atomos/IconeBotao'
|
|
6
|
-
import Icone from '../../atomos/Icone'
|
|
7
|
-
import alocar from '../../../assets/imagens/icons/Mais.svg'
|
|
8
|
-
import ajuda from '../../../assets/imagens/icons/Ajuda.svg'
|
|
9
|
-
import retirar from '../../../assets/imagens/icons/Menos.svg'
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import * as S from './styles'
|
|
3
|
+
import { theme } from '../../../styles/theme'
|
|
4
|
+
import { Box, Flex } from '@mantine/core'
|
|
5
|
+
import IconeBotao from '../../atomos/IconeBotao'
|
|
6
|
+
import Icone from '../../atomos/Icone'
|
|
7
|
+
import alocar from '../../../assets/imagens/icons/Mais.svg'
|
|
8
|
+
import ajuda from '../../../assets/imagens/icons/Ajuda.svg'
|
|
9
|
+
import retirar from '../../../assets/imagens/icons/Menos.svg'
|
|
10
10
|
|
|
11
11
|
interface MosaicoCriticaProps {
|
|
12
|
-
color?: string
|
|
13
|
-
nome?: string
|
|
14
|
-
saldo?: string
|
|
15
|
-
media?: string
|
|
16
|
-
critica?: string
|
|
17
|
-
mensagens?: string[]
|
|
18
|
-
absorcao?: string
|
|
19
|
-
podeExecutar?: boolean
|
|
20
|
-
desdobramento?: string
|
|
21
|
-
disabledAlocar?: boolean
|
|
22
|
-
disabledRetirar?: boolean
|
|
23
|
-
onClickAlocar: () => void
|
|
24
|
-
onClickRetirar: () => void
|
|
12
|
+
color?: string
|
|
13
|
+
nome?: string
|
|
14
|
+
saldo?: string
|
|
15
|
+
media?: string
|
|
16
|
+
critica?: string
|
|
17
|
+
mensagens?: string[]
|
|
18
|
+
absorcao?: string
|
|
19
|
+
podeExecutar?: boolean
|
|
20
|
+
desdobramento?: string
|
|
21
|
+
disabledAlocar?: boolean
|
|
22
|
+
disabledRetirar?: boolean
|
|
23
|
+
onClickAlocar: () => void
|
|
24
|
+
onClickRetirar: () => void
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const MosaicoCritica = ({
|
|
@@ -115,18 +115,18 @@ const MosaicoCritica = ({
|
|
|
115
115
|
) : (
|
|
116
116
|
mensagens?.length !== 0 && (
|
|
117
117
|
<IconeBotao
|
|
118
|
-
toolTipInfo={mensagens!.map(m => `• ${m}`).join('\n')}
|
|
118
|
+
toolTipInfo={mensagens!.map((m) => `• ${m}`).join('\n')}
|
|
119
119
|
tipo="round"
|
|
120
120
|
color={theme.colors.gray[300]}
|
|
121
121
|
>
|
|
122
|
-
<Icone svg={ajuda} fill={
|
|
122
|
+
<Icone svg={ajuda} fill={'#E50707'} width={14} height={14} />
|
|
123
123
|
</IconeBotao>
|
|
124
124
|
)
|
|
125
125
|
)}
|
|
126
126
|
</Box>
|
|
127
127
|
</Flex>
|
|
128
128
|
</S.MosaicoCriticaContainer>
|
|
129
|
-
)
|
|
130
|
-
}
|
|
129
|
+
)
|
|
130
|
+
}
|
|
131
131
|
|
|
132
|
-
export default MosaicoCritica
|
|
132
|
+
export default MosaicoCritica
|
|
@@ -1,28 +1,29 @@
|
|
|
1
|
-
import React, { useCallback, useRef, ComponentProps } from 'react'
|
|
2
|
-
import FullCalendar from '@fullcalendar/react'
|
|
3
|
-
import dayGridPlugin from '@fullcalendar/daygrid'
|
|
4
|
-
import timeGridPlugin from '@fullcalendar/timegrid'
|
|
5
|
-
import interactionPlugin from '@fullcalendar/interaction'
|
|
6
|
-
import { CalendarApi, EventContentArg } from '@fullcalendar/core'
|
|
7
|
-
import * as S from './styles'
|
|
8
|
-
import ptBrLocale from '@fullcalendar/core/locales/pt-br'
|
|
9
|
-
import SelectCustomizado from '../../atomos/Select'
|
|
10
|
-
import Botao from '../../atomos/Botao'
|
|
11
|
-
import { ComboboxData } from '@mantine/core'
|
|
1
|
+
import React, { useCallback, useRef, ComponentProps } from 'react'
|
|
2
|
+
import FullCalendar from '@fullcalendar/react'
|
|
3
|
+
import dayGridPlugin from '@fullcalendar/daygrid'
|
|
4
|
+
import timeGridPlugin from '@fullcalendar/timegrid'
|
|
5
|
+
import interactionPlugin from '@fullcalendar/interaction'
|
|
6
|
+
import { CalendarApi, EventContentArg } from '@fullcalendar/core'
|
|
7
|
+
import * as S from './styles'
|
|
8
|
+
import ptBrLocale from '@fullcalendar/core/locales/pt-br'
|
|
9
|
+
import SelectCustomizado from '../../atomos/Select'
|
|
10
|
+
import Botao from '../../atomos/Botao'
|
|
11
|
+
import { ComboboxData } from '@mantine/core'
|
|
12
12
|
|
|
13
13
|
interface CustomCalendarioProps {
|
|
14
|
-
confirm: (form: any) => void
|
|
15
|
-
liberar: () => void
|
|
16
|
-
onClickAdicionar?: () => void
|
|
17
|
-
btnAdicionar?: boolean
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
confirm: (form: any) => void
|
|
15
|
+
liberar: () => void
|
|
16
|
+
onClickAdicionar?: () => void
|
|
17
|
+
btnAdicionar?: boolean
|
|
18
|
+
disabledLiberaCritica?: boolean
|
|
19
|
+
perfilOptions: ComboboxData | undefined
|
|
20
|
+
hierarquiaOptions: ComboboxData | undefined
|
|
21
|
+
color?: string
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
// Estendendo as propriedades do FullCalendar
|
|
24
25
|
type CalendarioProps = CustomCalendarioProps &
|
|
25
|
-
ComponentProps<typeof FullCalendar
|
|
26
|
+
ComponentProps<typeof FullCalendar>
|
|
26
27
|
|
|
27
28
|
/* const events = [
|
|
28
29
|
{ title: 'Meeting', start: new Date(), end: new Date('2024-09-29') },
|
|
@@ -35,7 +36,7 @@ function renderEventContent(eventInfo: EventContentArg) {
|
|
|
35
36
|
{eventInfo.timeText} | {eventInfo.event.title}
|
|
36
37
|
</p>
|
|
37
38
|
</S.EventosWrapper>
|
|
38
|
-
)
|
|
39
|
+
)
|
|
39
40
|
}
|
|
40
41
|
const Calendario = ({
|
|
41
42
|
color,
|
|
@@ -46,16 +47,17 @@ const Calendario = ({
|
|
|
46
47
|
onClickAdicionar,
|
|
47
48
|
hierarquiaOptions,
|
|
48
49
|
btnAdicionar = true,
|
|
50
|
+
disabledLiberaCritica,
|
|
49
51
|
...calendarProps // Propagação das propriedades do FullCalendar
|
|
50
52
|
}: CalendarioProps) => {
|
|
51
|
-
const calendarRef = useRef<CalendarApi | null>(null)
|
|
53
|
+
const calendarRef = useRef<CalendarApi | null>(null)
|
|
52
54
|
//const [adicionar, setAdicionar] = useState(false);
|
|
53
55
|
|
|
54
56
|
const handleViewChange = useCallback((view: string) => {
|
|
55
57
|
if (calendarRef.current) {
|
|
56
|
-
calendarRef.current.changeView(view)
|
|
58
|
+
calendarRef.current.changeView(view)
|
|
57
59
|
}
|
|
58
|
-
}, [])
|
|
60
|
+
}, [])
|
|
59
61
|
|
|
60
62
|
return (
|
|
61
63
|
<S.CalendarioWrapper color={color}>
|
|
@@ -65,7 +67,12 @@ const Calendario = ({
|
|
|
65
67
|
ADICIONAR
|
|
66
68
|
</Botao>
|
|
67
69
|
)}
|
|
68
|
-
<Botao
|
|
70
|
+
<Botao
|
|
71
|
+
disabled={disabledLiberaCritica}
|
|
72
|
+
color={color}
|
|
73
|
+
tipo="default"
|
|
74
|
+
onClick={liberar}
|
|
75
|
+
>
|
|
69
76
|
LIBERAR CRÍTICA
|
|
70
77
|
</Botao>
|
|
71
78
|
</S.CalendarioHeaderButtons>
|
|
@@ -86,13 +93,13 @@ const Calendario = ({
|
|
|
86
93
|
{ label: 'Visualizar por semana', value: 'timeGridWeek' },
|
|
87
94
|
{ label: 'Visualizar por dia', value: 'timeGridDay' },
|
|
88
95
|
]}
|
|
89
|
-
onChange={e => handleViewChange(e!)}
|
|
96
|
+
onChange={(e) => handleViewChange(e!)}
|
|
90
97
|
/>
|
|
91
98
|
</S.CalendarioHeaderControl>
|
|
92
99
|
<FullCalendar
|
|
93
|
-
ref={element => {
|
|
100
|
+
ref={(element) => {
|
|
94
101
|
if (element) {
|
|
95
|
-
calendarRef.current = element.getApi()
|
|
102
|
+
calendarRef.current = element.getApi() // Armazena a API do calendário na ref
|
|
96
103
|
}
|
|
97
104
|
}}
|
|
98
105
|
plugins={[dayGridPlugin, timeGridPlugin, interactionPlugin]}
|
|
@@ -105,7 +112,7 @@ const Calendario = ({
|
|
|
105
112
|
{...calendarProps} // Passa todas as propriedades adicionais para o FullCalendar
|
|
106
113
|
/>
|
|
107
114
|
</S.CalendarioWrapper>
|
|
108
|
-
)
|
|
109
|
-
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
110
117
|
|
|
111
|
-
export default Calendario
|
|
118
|
+
export default Calendario
|