Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 7306 Rev 7307
Línea 1... Línea 1...
1
import React, { useEffect, useState } from 'react'
1
import React, { useEffect, useState } from 'react'
-
 
2
import { axios } from '../../utils'
2
import { Container, Grid } from '@mui/material'
3
import { Container, Grid } from '@mui/material'
3
import { Calendar, momentLocalizer } from 'react-big-calendar'
4
import { Calendar, momentLocalizer } from 'react-big-calendar'
4
import moment from 'moment'
5
import moment from 'moment'
5
import EventsList from '../../components/calendar/EventsList'
6
import EventsList from '../../components/calendar/EventsList'
6
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'
7
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'
7
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'
8
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'
8
import 'react-big-calendar/lib/sass/styles.scss'
-
 
9
import { axios } from '../../utils'
-
 
-
 
9
 
10
import EventModal from '../../components/calendar/EventModal'
10
import EventModal from '../../components/calendar/EventModal'
Línea -... Línea 11...
-
 
11
 
-
 
12
import 'react-big-calendar/lib/sass/styles.scss'
11
 
13
 
12
moment.locale('es-ES')
14
moment.locale('es-ES')
Línea 13... Línea 15...
13
const localizer = momentLocalizer(moment)
15
const localizer = momentLocalizer(moment)
14
 
16
 
Línea 52... Línea 54...
52
    <>
54
    <>
53
      <Container as="main" className="px-0">
55
      <Container as="main" className="px-0">
54
        <Grid container spacing={2}>
56
        <Grid container spacing={2}>
55
          <Grid item xs={12} md={8} spacing={3}>
57
          <Grid item xs={12} md={8} spacing={3}>
56
            <Calendar
58
            <Calendar
57
              views={['day', 'week', 'month']}
59
              views={['month', 'week', 'day', 'agenda']}
58
              selectable
60
              selectable
59
              localizer={localizer}
61
              localizer={localizer}
60
              defaultDate={new Date()}
62
              defaultDate={new Date()}
61
              defaultView="month"
63
              defaultView="month"
62
              onSelectEvent={selectEvent}
64
              onSelectEvent={selectEvent}
Línea 66... Línea 68...
66
                previous: <ArrowBackIosIcon />,
68
                previous: <ArrowBackIosIcon />,
67
                today: 'Hoy',
69
                today: 'Hoy',
68
                month: 'Mes',
70
                month: 'Mes',
69
                week: 'Semana',
71
                week: 'Semana',
70
                day: 'Día',
72
                day: 'Día',
-
 
73
                agenda: 'Agenda',
71
              }}
74
              }}
72
              eventPropGetter={(event) => {
75
              eventPropGetter={(event) => {
73
                const backgroundColor = event.backgroundColor
76
                const backgroundColor = event.backgroundColor
74
                  ? event.backgroundColor
77
                  ? event.backgroundColor
75
                  : 'blue'
78
                  : 'blue'