Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 739 Rev 893
Línea 57... Línea 57...
57
      .catch((err) => {
57
      .catch((err) => {
58
        dispatch(addNotification({ style: 'danger', msg: err.message }))
58
        dispatch(addNotification({ style: 'danger', msg: err.message }))
59
      })
59
      })
60
  }
60
  }
Línea 61... Línea 61...
61
 
61
 
62
  const formatDate = (date) => {
62
  const formatDate = (date, allDay) => {
Línea 63... Línea 63...
63
    const dateObj = new Date(date)
63
    const dateObj = new Date(date)
64
 
64
 
65
    if (isNaN(dateObj)) {
65
    if (isNaN(dateObj)) {
Línea 66... Línea 66...
66
      return date
66
      return date
67
    }
67
    }
68
 
68
 
69
    return new Intl.DateTimeFormat('en-US', {
69
    return new Intl.DateTimeFormat('es', {
70
      dateStyle: 'short',
70
      dateStyle: 'short',
71
      timeStyle: 'medium',
71
      timeStyle: allDay ? undefined : 'short',
Línea 72... Línea 72...
72
      hour12: false
72
      hour12: allDay ? undefined : true
73
    }).format(dateObj)
73
    }).format(dateObj)
Línea 80... Línea 80...
80
      <ul>
80
      <ul>
81
        {eventsAndTasks.length ? (
81
        {eventsAndTasks.length ? (
82
          eventsAndTasks.map(
82
          eventsAndTasks.map(
83
            ({
83
            ({
84
              id,
84
              id,
-
 
85
              allDay,
85
              url,
86
              url,
86
              title,
87
              title,
87
              backgroundColor,
88
              backgroundColor,
88
              start,
89
              start,
89
              end,
90
              end,
Línea 105... Línea 106...
105
                      <b>Evento: </b>
106
                      <b>Evento: </b>
106
                      {title}
107
                      {title}
107
                    </h4>
108
                    </h4>
108
                    <span>
109
                    <span>
109
                      <b>Inicio: </b>
110
                      <b>Inicio: </b>
110
                      {formatDate(start)}
111
                      {formatDate(start, allDay)}
111
                    </span>
112
                    </span>
112
                    {end && (
113
                    {end && (
113
                      <span>
114
                      <span>
114
                        <b>Fin: </b>
115
                        <b>Fin: </b>
115
                        {formatDate(end)}
116
                        {formatDate(end, allDay)}
116
                      </span>
117
                      </span>
117
                    )}
118
                    )}
118
                  </StyledEventContainer>
119
                  </StyledEventContainer>
119
                </li>
120
                </li>
120
              )
121
              )