Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3262 Rev 3394
Línea 12... Línea 12...
12
import Options from '@components/UI/Option'
12
import Options from '@components/UI/Option'
13
import ConfirmModal from '@components/modals/ConfirmModal'
13
import ConfirmModal from '@components/modals/ConfirmModal'
Línea 14... Línea 14...
14
 
14
 
15
export default function HabitItem({
15
export default function HabitItem({
16
  habit: {
16
  habit: {
17
    id = 1,
17
    id,
18
    name = 'Habito 1',
18
    name = '',
19
    description = 'Prueba',
19
    description = '',
20
    intelligence = 'physical',
20
    intelligence = '',
21
    actions = {
21
    actions = {
22
      link_edit:
-
 
23
        'https://dev-services.leaderslinked.com/habits/skills/edit/da9210a1-c36b-4b51-b102-9f3bd1e33bc1',
22
      link_edit: '',
24
      link_delete:
-
 
25
        'https://dev-services.leaderslinked.com/habits/skills/delete/da9210a1-c36b-4b51-b102-9f3bd1e33bc1'
23
      link_delete: ''
26
    }
24
    }
27
  }
25
  }
28
}) {
26
}) {
29
  const [show, setShow] = useState(false)
27
  const [show, setShow] = useState(false)
Línea 49... Línea 47...
49
  return (
47
  return (
50
    <>
48
    <>
51
      <Widget>
49
      <Widget>
52
        <Widget.Header
50
        <Widget.Header
53
          title={name}
51
          title={name}
54
          subheader={intelligenceLabel.name}
52
          subheader={intelligenceLabel?.name ?? ''}
55
          renderAction={() => (
53
          renderAction={() => (
56
            <Options>
54
            <Options>
57
              {actions.link_edit && (
55
              {actions.link_edit && (
58
                <Options.Item onClick={() => navigate(`edit/${id}`)}>
56
                <Options.Item onClick={() => navigate(`edit/${id}`)}>
59
                  Editar
57
                  Editar