Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12324 Rev 14229
Línea 7... Línea 7...
7
import { useHistory, useParams } from 'react-router-dom'
7
import { useHistory, useParams } from 'react-router-dom'
8
import 'react-datetime/css/react-datetime.css'
8
import 'react-datetime/css/react-datetime.css'
9
import { addNotification } from '../../../redux/notification/notification.actions'
9
import { addNotification } from '../../../redux/notification/notification.actions'
10
import { useDispatch } from 'react-redux'
10
import { useDispatch } from 'react-redux'
11
import parse from 'html-react-parser'
11
import parse from 'html-react-parser'
-
 
12
import ToggleComponent from '../../../shared/ToggleComponent'
Línea 12... Línea 13...
12
 
13
 
13
const FormView = ({
14
const FormView = ({
14
	actionLink,
15
	actionLink,
15
	googleApiKey,
16
	googleApiKey,
Línea 91... Línea 92...
91
				msg: 'Ha ocurrido un error'
92
				msg: 'Ha ocurrido un error'
92
			})))
93
			})))
Línea 93... Línea 94...
93
 
94
 
Línea -... Línea 95...
-
 
95
	}
94
	}
96
 
-
 
97
	useEffect(() => {
-
 
98
		register('description')
Línea 95... Línea 99...
95
 
99
		register('status')
96
	useEffect(() => register('description'), [])
100
	}, [])
97
 
101
 
98
	useEffect(() => {
102
	useEffect(() => {
Línea 211... Línea 215...
211
								defaultValue={watch('description') ? parse(watch('description')) : ''}
215
								defaultValue={watch('description') ? parse(watch('description')) : ''}
212
							/>
216
							/>
213
						</div>
217
						</div>
214
						<div className="form-group">
218
						<div className="form-group">
215
							<label>Estatus</label>
219
							<label>Estatus</label>
216
							<div
-
 
217
								className={`toggle btn btn-block btn-primary ${!isActive && 'off'}`}
-
 
218
								data-toggle="toggle"
-
 
219
								role="button"
220
							<ToggleComponent
220
								style={{ width: '130px' }}
-
 
221
								onClick={() => setIsActive(!isActive)}
221
								setValue={(e) => setValue('status', e)}
222
							>
-
 
223
								<input
-
 
224
									type="checkbox"
-
 
225
									checked={isActive}
-
 
226
								/>
222
							/>
227
								<div className="toggle-group">
-
 
228
									<label htmlFor="status" className="btn btn-primary toggle-on">Activo</label>
-
 
229
									<label htmlFor="status" className="btn btn-light toggle-off">Inactivo</label>
-
 
230
									<span className="toggle-handle btn btn-light"></span>
-
 
231
								</div>
-
 
232
							</div>
-
 
233
						</div>
223
						</div>
234
						<div className="form-group">
224
						<div className="form-group">
235
							<button
225
							<button
236
								type="submit"
226
								type="submit"
237
								className="btn btn-primary btn-form-save-close mr-2"
227
								className="btn btn-primary btn-form-save-close mr-2"