Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12999 Rev 13001
Línea 125... Línea 125...
125
		setIsShowQuestionModal(false)
125
		setIsShowQuestionModal(false)
126
		setQuestionSelected(INITIAL_QUESTION)
126
		setQuestionSelected(INITIAL_QUESTION)
127
	}
127
	}
Línea 128... Línea 128...
128
 
128
 
-
 
129
	const addQuestion = (question) => {
-
 
130
		console.log(question)
-
 
131
		console.log(sectionSelected)
129
	const addQuestion = (question) => {
132
		console.log(content)
Línea 130... Línea 133...
130
		const uuid = new Date().getTime()
133
		const uuid = new Date().getTime()
131
 
134
 
132
		setContent(prev => prev.map(prevSection => {
135
		setContent(prev => prev.map(prevSection => {
133
			if (prevSection.slug_section === sectionSelected.slug_section) {
136
			if (prevSection.slug_section === sectionSelected.slug_section) {
134
				return prevSection.questions.push({ ...question, slug_question: `question${uuid}` })
137
				return prevSection.questions.push({ ...question, slug_question: `question${uuid}` })
135
			}
138
			}
Línea 136... Línea 139...
136
		}))
139
		}))
-
 
140
	}
137
	}
141
 
138
 
142
	const editQuestion = (question) => {
139
	const editQuestion = (question) => {
143
 
Línea 140... Línea 144...
140
		setContent(prev => prev.map(prevSection => {
144
		setContent(prev => prev.map(prevSection => {