Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 6449 Rev 6450
Línea 138... Línea 138...
138
  }
138
  }
Línea 139... Línea 139...
139
 
139
 
140
  useEffect(() => {
140
  useEffect(() => {
Línea -... Línea 141...
-
 
141
    setRemainingTime(getTimeDiff(time))
-
 
142
 
141
    setRemainingTime(getTimeDiff(time))
143
    if (!time) return
142
 
144
 
143
    const interval = setInterval(() => {
145
    const interval = setInterval(() => {
144
      timeRef.current = timeRef.current - 60
146
      timeRef.current = timeRef.current - 60
Línea 156... Línea 158...
156
 
158
 
157
  return (
159
  return (
158
    <form onChange={sendVote} className={styles.survey_form}>
160
    <form onChange={sendVote} className={styles.survey_form}>
159
      <h3>{question}</h3>
161
      <h3>{question}</h3>
160
      {resultType === 'pu' && (
162
      {resultType === 'pu' && (
161
        <span>
163
        <span
162
          <PublicIcon /> Los resultados estaran disponibles al finalizar la
164
          title="Los resultados estaran disponibles al finalizar la
-
 
165
          encuesta."
-
 
166
        >
163
          encuesta.
167
          <PublicIcon /> Público
164
        </span>
168
        </span>
165
      )}
169
      )}
166
      {resultType === 'pr' && (
-
 
167
        <span>
170
      {resultType === 'pr' && (
-
 
171
        <span title="Los resultados de la votación son privados.">
168
          <LockClockIcon /> Los resultados de la votación son privados.
172
          <LockClockIcon /> Privado.
169
        </span>
173
        </span>
170
      )}
174
      )}
171
      {answers.map(
175
      {answers.map(
172
        (option, index) =>
176
        (option, index) =>
Línea 185... Línea 189...
185
                disabled={!isActive}
189
                disabled={!isActive}
186
                ref={register({ required: true })}
190
                ref={register({ required: true })}
187
                value={index + 1}
191
                value={index + 1}
188
              />
192
              />
189
              <label htmlFor={`vote-${index + 1}`}>{option}</label>
193
              <label htmlFor={`vote-${index + 1}`}>{option}</label>
-
 
194
              {!time && votes && (
-
 
195
                <span className="mb-0">
-
 
196
                  {getPorcentage(votes[index], voteRef.current)}%
-
 
197
                </span>
-
 
198
              )}
190
            </RadioButton>
199
            </RadioButton>
191
          )
200
          )
192
      )}
201
      )}
193
      <span>Tiempo restante: {remainingTime}</span>
202
      <span>Tiempo restante: {remainingTime}</span>
194
    </form>
203
    </form>