Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 5 Rev 703
Línea 13... Línea 13...
13
const OverviewModal = ({
13
const OverviewModal = ({
14
  isOpen = false,
14
  isOpen = false,
15
  overview = '',
15
  overview = '',
16
  id = '',
16
  id = '',
17
  closeModal = function () {},
17
  closeModal = function () {},
18
  onComplete = function () {},
18
  onComplete = function () {}
19
}) => {
19
}) => {
20
  const [loading, setLoading] = useState(false)
20
  const [loading, setLoading] = useState(false)
21
  const dispatch = useDispatch()
-
 
22
  const { pathname } = useLocation()
21
  const { pathname } = useLocation()
-
 
22
  const dispatch = useDispatch()
Línea 23... Línea 23...
23
 
23
 
Línea 24... Línea 24...
24
  const { register, errors, handleSubmit, setValue } = useForm()
24
  const { register, errors, handleSubmit, setValue } = useForm()
25
 
25
 
26
  useEffect(() => {
26
  useEffect(() => {
Línea 27... Línea 27...
27
    register('description', { required: 'Este campo es requerido' })
27
    register('description', { required: 'Este campo es requerido' })
28
  }, [])
28
  }, [])
29
 
29
 
30
  const onSubmitHandler = async ({ description }) => {
30
  const onSubmitHandler = async ({ description }) => {
31
    const typesUrl = {
31
    const typesUrl = {
32
      profile: `/profile/my-profiles/extended/${id}`,
32
      profile: `/profile/my-profiles/extended/${id}`,
Línea 33... Línea 33...
33
      group: `/group/my-groups/extended/${id}`,
33
      group: `/group/my-groups/extended/${id}`
Línea 83... Línea 83...
83
          {errors.description && (
83
          {errors.description && (
84
            <FormErrorFeedback>{errors.description.message}</FormErrorFeedback>
84
            <FormErrorFeedback>{errors.description.message}</FormErrorFeedback>
85
          )}
85
          )}
86
        </Modal.Body>
86
        </Modal.Body>
87
        <Modal.Footer>
87
        <Modal.Footer>
88
          <Button size="sm" type="submit">
88
          <Button size='sm' type='submit'>
89
            Enviar
89
            Enviar
90
          </Button>
90
          </Button>
91
          <Button size="sm" variant="danger" onClick={closeModal}>
91
          <Button size='sm' variant='danger' onClick={closeModal}>
92
            Cancelar
92
            Cancelar
93
          </Button>
93
          </Button>
94
        </Modal.Footer>
94
        </Modal.Footer>
95
      </form>
95
      </form>
96
    </Modal>
96
    </Modal>