Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 13073 Rev 13074
Línea 322... Línea 322...
322
 
322
 
323
	const validate = () => {
323
	const validate = () => {
324
		const sectionError = content.find(section => !section.questions.length)
324
		const sectionError = content.find(section => !section.questions.length)
Línea -... Línea 325...
-
 
325
		const questionsToOptions = content.map(section => section.questions.map(question => question.type !== 'open'))
-
 
326
 
325
		const questionsToOptions = content.map(section => section.questions.map(question => question.type !== 'open'))
327
		const questionError = questionsToOptions.find(question => !question.options.length)
326
 
328
		
327
		if (sectionError.name) {
329
		if (sectionError.name) {
328
			dispatch(addNotification({
330
			dispatch(addNotification({
329
				style: 'danger',
331
				style: 'danger',
Línea 330... Línea 332...
330
				msg: `La sección ${sectionError.name} no tiene preguntas`
332
				msg: `La sección ${sectionError.name} no tiene preguntas`
331
			}))
333
			}))
Línea 332... Línea -...
332
 
-
 
Línea 333... Línea 334...
333
			return false
334
 
Línea 334... Línea 335...
334
		}
335
			return false
Línea 335... Línea 336...
335
 
336
		}