Proyectos de Subversion LeadersLinked - SPA

Rev

Rev 2784 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 2784 Rev 2785
Línea 13... Línea 13...
13
import Spinner from '@app/components/UI/Spinner'
13
import Spinner from '@app/components/UI/Spinner'
14
import SwitchInput from '@app/components/UI/SwitchInput'
14
import SwitchInput from '@app/components/UI/SwitchInput'
Línea 15... Línea 15...
15
 
15
 
16
const Row = styled('div')(({ theme }) => ({
16
const Row = styled('div')(({ theme }) => ({
17
  display: 'flex',
-
 
18
  flexWrap: 'wrap',
17
  display: 'flex',
19
  gap: theme.spacing(0.5)
18
  gap: theme.spacing(0.5)
Línea 20... Línea 19...
20
}))
19
}))
21
 
20
 
Línea 36... Línea 35...
36
      is_adult: 'n'
35
      is_adult: 'n'
37
    }
36
    }
38
  })
37
  })
39
  const watchedIsAdult = watch('is_adult') === 'y'
38
  const watchedIsAdult = watch('is_adult') === 'y'
Línea 40... Línea 39...
40
 
39
 
41
  const onSubmit = async (data) => {
40
  const onSubmit = handleSubmit(async (data) => {
42
    const formData = new FormData()
41
    const formData = new FormData()
Línea 43... Línea 42...
43
    Object.entries(data).map(([key, value]) => formData.append(key, value))
42
    Object.entries(data).map(([key, value]) => formData.append(key, value))
44
 
43
 
Línea 61... Línea 60...
61
        addNotification({ style: 'success', msg: data })
60
        addNotification({ style: 'success', msg: data })
62
      })
61
      })
63
      .catch((err) => {
62
      .catch((err) => {
64
        addNotification({ style: 'danger', msg: err.message })
63
        addNotification({ style: 'danger', msg: err.message })
65
      })
64
      })
66
  }
65
  })
Línea 67... Línea 66...
67
 
66
 
68
  useEffect(() => {
67
  useEffect(() => {
69
    register('first_name')
68
    register('first_name')
70
    register('last_name')
69
    register('last_name')
Línea 87... Línea 86...
87
  return (
86
  return (
88
    <Widget>
87
    <Widget>
89
      <Widget.Header title='Información básica' />
88
      <Widget.Header title='Información básica' />
Línea 90... Línea 89...
90
 
89
 
91
      <Widget.Body>
90
      <Widget.Body>
92
        <form onSubmit={handleSubmit(onSubmit)}>
91
        <form onSubmit={onSubmit}>
93
          <Row>
92
          <Row>
94
            <Input
93
            <Input
95
              label='Nombre'
94
              label='Nombre'
96
              name='first_name'
95
              name='first_name'