Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15085 Rev 15093
Línea 90... Línea 90...
90
 
90
 
91
	const addCompetencies = () => {
91
	const addCompetencies = () => {
Línea 92... Línea 92...
92
		const current_competency = competencyOptions.find(competency => competency.competency_id === selectInput.current.value)
92
		const current_competency = competencyOptions.find(competency => competency.competency_id === selectInput.current.value)
93
 
93
 
94
		if (competenciesSelected.some(competency => competency.competency_id === current_competency.competency_id)) {
-
 
95
			dispatch(addNotification({ style: 'danger', msg: 'Competencia ya agregada' }))
94
		if (competenciesSelected.some(competency => competency.competency_id === current_competency.competency_id)) {
Línea 96... Línea 95...
96
			return selectInput.current.value = ''
95
			return dispatch(addNotification({ style: 'danger', msg: 'Competencia ya agregada' }))
97
		}
96
		}
98
 
97
 
Línea 99... Línea 98...
99
		setCompetenciesSelected([current_competency, ...competenciesSelected])
98
		setCompetenciesSelected(prev => [current_competency, ...prev])
100
		return selectInput.current.value = ''
99
		selectInput.current.value = ''
101
	}
100
	}