Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 707 | Rev 710 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 707 Rev 709
Línea 8... Línea 8...
8
import EmptySection from '../UI/EmptySection'
8
import EmptySection from '../UI/EmptySection'
9
import useFetch from '../../hooks/useFetch'
9
import useFetch from '../../hooks/useFetch'
Línea 10... Línea 10...
10
 
10
 
11
const StyledContainer = styled(WidgetLayout)`
11
const StyledContainer = styled(WidgetLayout)`
12
  padding: 1rem;
-
 
13
  h2 {
-
 
14
    font-size: 1.1rem;
-
 
15
    font-weight: 600;
-
 
16
    color: var(--title-color);
-
 
17
  }
12
  padding: 1rem;
18
  ul {
13
  ul {
19
    display: flex;
14
    display: flex;
20
    flex-direction: column;
15
    flex-direction: column;
21
    gap: 0.5rem;
16
    gap: 0.5rem;
22
    margin-top: 1rem;
-
 
23
  }
-
 
24
  a {
-
 
25
    display: block;
17
    margin-top: 0.5rem;
26
  }
18
  }
Línea -... Línea 19...
-
 
19
`
-
 
20
 
-
 
21
const StyledEventContainer = styled.div`
-
 
22
  display: flex;
-
 
23
  flex-direction: column;
-
 
24
  cursor: pointer;
-
 
25
  padding: 0.5rem;
-
 
26
  border-radius: ${(props) => props.theme.border.radius};
-
 
27
  color: ${(props) => props.color || props.theme.font.color.primary};
-
 
28
  background-color: ${(props) => props.background || 'transparent'};
27
`
29
`
28
 
30
 
29
const EventsList = () => {
31
const EventsList = () => {
Línea 30... Línea 32...
30
  const { data: eventsAndTasks } = useFetch('/helpers/next-events', [])
32
  const { data: eventsAndTasks } = useFetch('/helpers/next-events', [])
31
  const dispatch = useDispatch()
33
  const dispatch = useDispatch()
32
 
34
 
33
  const getBackendVarUrl = (url) => {
35
  const getAdminAuth = (url) => {
34
    axios
36
    axios
Línea 55... Línea 57...
55
        {eventsAndTasks.length ? (
57
        {eventsAndTasks.length ? (
56
          eventsAndTasks.map(
58
          eventsAndTasks.map(
57
            ({ id, url, title, backgroundColor, start, end, textColor }) => {
59
            ({ id, url, title, backgroundColor, start, end, textColor }) => {
58
              return (
60
              return (
59
                <li key={id}>
61
                <li key={id}>
60
                  <div
-
 
61
                    className='calendar-event'
-
 
62
                    style={{
62
                  <StyledEventContainer
63
                      color: textColor,
63
                    color={textColor}
64
                      background: backgroundColor
64
                    background={backgroundColor}
65
                    }}
-
 
66
                    onClick={() => getBackendVarUrl(url)}
65
                    onClick={() => getAdminAuth(url)}
67
                  >
66
                  >
68
                    <h4>
67
                    <h4>
69
                      <b>Evento: </b>
68
                      <b>Evento: </b>
70
                      {title}
69
                      {title}
71
                    </h4>
70
                    </h4>
Línea 77... Línea 76...
77
                      <span>
76
                      <span>
78
                        <b>Fin: </b>
77
                        <b>Fin: </b>
79
                        {end}
78
                        {end}
80
                      </span>
79
                      </span>
81
                    )}
80
                    )}
82
                  </div>
81
                  </StyledEventContainer>
83
                </li>
82
                </li>
84
              )
83
              )
85
            }
84
            }
86
          )
85
          )
87
        ) : (
86
        ) : (