Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14207 Rev 14228
Línea 4... Línea 4...
4
import { useForm } from 'react-hook-form'
4
import { useForm } from 'react-hook-form'
5
import { useDispatch } from 'react-redux'
5
import { useDispatch } from 'react-redux'
6
import { useHistory, useParams } from 'react-router-dom'
6
import { useHistory, useParams } from 'react-router-dom'
7
import { addNotification } from '../../redux/notification/notification.actions'
7
import { addNotification } from '../../redux/notification/notification.actions'
Línea 8... Línea -...
8
 
-
 
9
const pointsOptions = [
-
 
10
	{ label: 'Sugerir otro cargo', value: 0 },
-
 
11
	{ label: '25%', value: 1 },
-
 
12
	{ label: '50%', value: 2 },
-
 
13
	{ label: '75%', value: 3 },
-
 
14
	{ label: '100%', value: 4 }
-
 
15
]
-
 
16
 
8
 
17
const FormView = ({
9
const FormView = ({
18
	actionLink = '',
10
	actionLink = '',
19
	setActionLink = function () { }
11
	setActionLink = function () { }
Línea 24... Línea 16...
24
	const history = useHistory()
16
	const history = useHistory()
25
	const { action } = useParams()
17
	const { action } = useParams()
26
	const { setValue, register, watch, handleSubmit } = useForm()
18
	const { setValue, register, watch, handleSubmit } = useForm()
Línea 27... Línea 19...
27
 
19
 
28
	//States
-
 
29
	const [data, setData] = useState({})
20
	//States
Línea 30... Línea 21...
30
	const [supervisers, setSupervisers] = useState([])
21
	const [supervisers, setSupervisers] = useState([])
Línea 31... Línea 22...
31
 
22
 
Línea 114... Línea 105...
114
											<div className="card">
105
											<div className="card">
115
												<div className="row">
106
												<div className="row">
116
													<div className="col-4">
107
													<div className="col-4">
117
														<div className="form-group">
108
														<div className="form-group">
118
															<label>Nombre</label>
109
															<label>Nombre</label>
119
															<input type="text" name='name' ref={register} />
110
															<input className='form-control' type="text" name='name' ref={register} />
120
														</div>
111
														</div>
121
													</div>
112
													</div>
122
													<div className="col-4">
113
													<div className="col-4">
123
														<div className="form-group">
114
														<div className="form-group">
124
															<label>Nombre</label>
115
															<label>Nombre</label>
Línea 130... Línea 121...
130
																	)
121
																	)
131
																}
122
																}
132
															</select>
123
															</select>
133
														</div>
124
														</div>
134
													</div>
125
													</div>
-
 
126
													<div className="col-4">
-
 
127
														<div className="form-group">
-
 
128
															<label>Nombre</label>
-
 
129
															<div
-
 
130
																className={`toggle btn btn-block btn-primary ${!watch('status') && 'off'}`}
-
 
131
																data-toggle="toggle"
-
 
132
																role="button"
-
 
133
																style={{ width: '130px' }}
-
 
134
															>
-
 
135
																<input
-
 
136
																	type="checkbox"
-
 
137
																	ref={register}
-
 
138
																	name='status'
-
 
139
																/>
-
 
140
																<div className="toggle-group">
-
 
141
																	<label htmlFor="status" className="btn btn-primary toggle-on">Activo</label>
-
 
142
																	<label htmlFor="status" className="btn btn-light toggle-off">Inactivo</label>
-
 
143
																	<span className="toggle-handle btn btn-light"></span>
-
 
144
																</div>
-
 
145
															</div>
-
 
146
														</div>
-
 
147
													</div>
135
												</div>
148
												</div>
136
											</div>
149
											</div>
137
										</div>
150
										</div>
138
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">
151
										<div className="tab-pane fade" id="profile" role="tabpanel" aria-labelledby="profile-tab">