Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 12733 Rev 12734
Línea 133... Línea 133...
133
		reset()
133
		reset()
134
		history.goBack()
134
		history.goBack()
135
	}
135
	}
Línea 136... Línea 136...
136
 
136
 
137
	useEffect(() => {
-
 
138
		register('description')
-
 
139
		register('text')
-
 
140
	}, [])
-
 
141
 
-
 
142
	useEffect(() => {
137
	useEffect(() => {
143
		if (action === 'edit') {
138
		if (action === 'edit') {
144
			axios.get(actionLink)
139
			axios.get(actionLink)
145
				.then(({ data }) => {
140
				.then(({ data }) => {
146
					if (!data.success) {
141
					if (!data.success) {
Línea 168... Línea 163...
168
							<label>Nombre</label>
163
							<label>Nombre</label>
169
							<input type="text" name="name" className='form-control' ref={register({ required: true, maxLength: 50 })} />
164
							<input type="text" name="name" className='form-control' ref={register({ required: true, maxLength: 50 })} />
170
						</div>
165
						</div>
171
						<div className="form-group">
166
						<div className="form-group">
172
							<label htmlFor="form-description">Descripción</label>
167
							<label htmlFor="form-description">Descripción</label>
173
							<DescriptionInput
168
							{/* <DescriptionInput
174
								defaultValue={watch('description') ? parse(watch('description')) : ''}
169
								defaultValue={watch('description') ? parse(watch('description')) : ''}
175
								name='description'
170
								name='description'
176
								onChange={setValue}
171
								onChange={setValue}
177
							/>
172
							/> */}
178
						</div>
173
						</div>
179
						<div className="form-group">
174
						<div className="form-group">
180
							<label htmlFor="form-description">Texto</label>
175
							<label htmlFor="form-description">Texto</label>
181
							<DescriptionInput
176
							{/* <DescriptionInput
182
								defaultValue={watch('text') ? parse(watch('text')) : ''}
177
								defaultValue={watch('text') ? parse(watch('text')) : ''}
183
								name='text'
178
								name='text'
184
								onChange={setValue}
179
								onChange={setValue}
185
							/>
180
							/> */}
186
						</div>
181
						</div>
187
						<div className="form-group">
182
						<div className="form-group">
188
							<label htmlFor="form-status">Estatus</label>
183
							<label htmlFor="form-status">Estatus</label>
189
							<select name="form-status" className="form-control" onChange={(e) => setStatus(e.target.value)} value={status}>
184
							<select name="form-status" className="form-control" onChange={(e) => setStatus(e.target.value)} value={status}>
190
								<option value="A">Activo</option>
185
								<option value="A">Activo</option>