Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 15507 Rev 15511
Línea 11... Línea 11...
11
	isOpen = false,
11
	isOpen = false,
12
	currentItem = null,
12
	currentItem = null,
13
	onClose = function () { },
13
	onClose = function () { },
14
	onComplete= function () { }
14
	onComplete= function () { }
15
}) => {
15
}) => {
16
	const [isActive, setIsActive] = useState(false)
16
	const [isActive, setIsActive] = useState(currentItem?.status === 'a' ? true : false)
17
	const {register,handleSubmit,getValues,setValue,clearErrors,formState: { errors }} = useForm({
17
	const {register,handleSubmit,getValues,setValue,clearErrors,formState: { errors }} = useForm({
18
		defaultValues: {
18
		defaultValues: {
19
			description: '',
19
			description: '',
20
		}
20
		}
21
	})
21
	})
Línea 76... Línea 76...
76
						onInstanceReady={(e) => currentItem && e.editor.setData(currentItem.name)}
76
						onInstanceReady={(e) => currentItem && e.editor.setData(currentItem.name)}
77
						config={CKEDITOR_OPTIONS}
77
						config={CKEDITOR_OPTIONS}
78
						name="description"
78
						name="description"
79
					/>
79
					/>
80
					{errors.description && <p>Este campo es requerido</p>}
80
					{errors.description && <p>Este campo es requerido</p>}
81
					<ToggleComponent setValue={(value)=> setIsActive(value)}/>
81
					<ToggleComponent currentValue={isActive} setValue={(value)=> setIsActive(value)}/>
82
				</Modal.Body>
82
				</Modal.Body>
83
				<Modal.Footer>
83
				<Modal.Footer>
84
					<Button variant="primary" type="submit">
84
					<Button variant="primary" type="submit">
85
                        Enviar
85
                        Enviar
86
					</Button>
86
					</Button>