Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3155 Rev 3245
Línea 1... Línea 1...
1
import React from 'react'
1
import React from 'react'
2
import { useForm } from 'react-hook-form'
2
import { useForm } from 'react-hook-form'
3
import { Button } from '@mui/material'
3
import { Button } from '@mui/material'
Línea -... Línea 4...
-
 
4
 
4
 
5
import Widget from '@components/UI/Widget'
5
import Form from '@components/common/form'
6
import Form from '@components/common/form'
6
import LoadingWrapper from '@components/common/loading-wrapper'
7
import LoadingWrapper from '@components/common/loading-wrapper'
7
import Input from '@components/UI/inputs/Input'
8
import Input from '@components/UI/inputs/Input'
Línea 20... Línea 21...
20
    defaultValues,
21
    defaultValues,
21
    values
22
    values
22
  })
23
  })
Línea 23... Línea 24...
23
 
24
 
-
 
25
  return (
-
 
26
    <Widget>
24
  return (
27
      <Widget.Body>
25
    <Form onSubmit={handleSubmit(onSubmit)}>
28
        <Form onSubmit={handleSubmit(onSubmit)}>
26
      <LoadingWrapper loading={isSubmitting}>
29
          <LoadingWrapper loading={isSubmitting}>
27
        <Input
30
            <Input
28
          label='Titulo'
31
              label='Titulo'
29
          name='name'
32
              name='name'
30
          control={control}
33
              control={control}
31
          error={errors.name?.message}
34
              error={errors.name?.message}
32
          rules={{ required: 'El titulo es requerido' }}
35
              rules={{ required: 'El titulo es requerido' }}
Línea 33... Línea 36...
33
        />
36
            />
34
 
37
 
35
        <Ckeditor
38
            <Ckeditor
36
          name='description'
39
              name='description'
37
          control={control}
40
              control={control}
38
          label='Descripción'
41
              label='Descripción'
39
          error={errors.description?.message}
42
              error={errors.description?.message}
Línea 40... Línea 43...
40
          rules={{ required: 'La descripción es requerida' }}
43
              rules={{ required: 'La descripción es requerida' }}
41
        />
44
            />
42
 
45
 
43
        <Button type='submit' color='primary'>
46
            <Button type='submit' color='primary'>
44
          Enviar
47
              Enviar
-
 
48
            </Button>
-
 
49
          </LoadingWrapper>
45
        </Button>
50
        </Form>
46
      </LoadingWrapper>
51
      </Widget.Body>