Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 10852 Rev 10853
Línea 22... Línea 22...
22
		description: '',
22
		description: '',
23
		functions: '',
23
		functions: '',
24
		objectives: ''
24
		objectives: ''
25
	})
25
	})
26
	const [candidatesOptions, setCandidatesOptions] = useState([])
26
	const [candidatesOptions, setCandidatesOptions] = useState([])
27
	const [competencies, setCompetencies] = useState([])
27
	const [competencies, setCompetencies] = useState([{
-
 
28
		competency_uuid: '',
-
 
29
		competency_name: '',
-
 
30
		competency_type_uuid: '',
-
 
31
		competency_type_name: '',
-
 
32
		behaviors: []
-
 
33
	}])
28
	const [pointsOptions, setPointsOptions] = useState([
34
	const [pointsOptions, setPointsOptions] = useState([
29
		{ label: 'Evaluación', value: null },
35
		{ label: 'Evaluación', value: null },
30
		{ label: 'Sugerir otro cargo', value: 0 },
36
		{ label: 'Sugerir otro cargo', value: 0 },
31
		{ label: '25%', value: 1 },
37
		{ label: '25%', value: 1 },
32
		{ label: '50%', value: 2 },
38
		{ label: '50%', value: 2 },
Línea 45... Línea 51...
45
	const dispatch = useDispatch()
51
	const dispatch = useDispatch()
46
	const { action } = useParams()
52
	const { action } = useParams()
Línea 47... Línea 53...
47
 
53
 
Línea 48... Línea 54...
48
	const onSubmit = () => {
54
	const onSubmit = () => {
49
 
55
 
50
		const content = competencies.behaviors.map(behavior => {
56
		const content = competencies.map(competency => competency.behaviors.map(behavior => {
51
			return {
57
			return {
52
				competencyUuid: behavior.competency_uuid,
58
				competencyUuid: behavior.competency_uuid,
53
				behaviorUuid: behavior.uuid,
59
				behaviorUuid: behavior.uuid,
54
				comment: watch(`${behavior.competency_uuid}_${behavior.uuid}-comment`),
60
				comment: watch(`${behavior.competency_uuid}_${behavior.uuid}-comment`),
55
				evaluation: watch(`${behavior.competency_uuid}_${behavior.uuid}-points`)
61
				evaluation: watch(`${behavior.competency_uuid}_${behavior.uuid}-points`)
Línea 56... Línea 62...
56
			}
62
			}
57
		})
63
		}))
58
 
64
 
59
		const submitData = new FormData()
65
		const submitData = new FormData()