Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15083 Rev 15084
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)) {
94
		if (competenciesSelected.some(competency => competency.competency_id === current_competency.competency_id)) {
95
			dispatch(addNotification({ style: 'danger', msg: 'Competencia ya agregada' }))
95
			return dispatch(addNotification({ style: 'danger', msg: 'Competencia ya agregada' }))
96
			return selectInput.current.value
96
		}
97
		}
-
 
98
 
97
		
99
		setCompetenciesSelected([current_competency, ...competenciesSelected])
Línea 98... Línea 100...
98
		setCompetenciesSelected([current_competency, ...competenciesSelected])
100
		return selectInput.current.value
99
	}
101
	}
100
 
102