Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 14229 Rev 14230
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 13... Línea 12...
13
 
12
 
14
const FormView = ({
13
const FormView = ({
15
	actionLink,
14
	actionLink,
16
	googleApiKey,
15
	googleApiKey,
Línea 92... Línea 91...
92
				msg: 'Ha ocurrido un error'
91
				msg: 'Ha ocurrido un error'
93
			})))
92
			})))
Línea 94... Línea 93...
94
 
93
 
Línea 95... Línea -...
95
	}
-
 
96
 
94
	}
97
	useEffect(() => {
-
 
98
		register('description')
-
 
Línea 99... Línea 95...
99
		register('status')
95
 
100
	}, [])
96
	useEffect(() => register('description'), [])
101
 
97
 
102
	useEffect(() => {
98
	useEffect(() => {
Línea 215... Línea 211...
215
								defaultValue={watch('description') ? parse(watch('description')) : ''}
211
								defaultValue={watch('description') ? parse(watch('description')) : ''}
216
							/>
212
							/>
217
						</div>
213
						</div>
218
						<div className="form-group">
214
						<div className="form-group">
219
							<label>Estatus</label>
215
							<label>Estatus</label>
-
 
216
							<div
-
 
217
								className={`toggle btn btn-block btn-primary ${!isActive && 'off'}`}
-
 
218
								data-toggle="toggle"
220
							<ToggleComponent
219
								role="button"
-
 
220
								style={{ width: '130px' }}
221
								setValue={(e) => setValue('status', e)}
221
								onClick={() => setIsActive(!isActive)}
-
 
222
							>
-
 
223
								<input
-
 
224
									type="checkbox"
-
 
225
									checked={isActive}
222
							/>
226
								/>
-
 
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>
223
						</div>
233
						</div>
224
						<div className="form-group">
234
						<div className="form-group">
225
							<button
235
							<button
226
								type="submit"
236
								type="submit"
227
								className="btn btn-primary btn-form-save-close mr-2"
237
								className="btn btn-primary btn-form-save-close mr-2"