Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 3156 Rev 3379
Línea 7... Línea 7...
7
  ListItemButton,
7
  ListItemButton,
8
  ListItemText,
8
  ListItemText,
9
  Typography
9
  Typography
10
} from '@mui/material'
10
} from '@mui/material'
Línea 11... Línea 11...
11
 
11
 
12
import { axios } from '@app/utils'
-
 
13
import { addNotification } from '@app/redux/notification/notification.actions'
12
import { axios } from '@utils'
-
 
13
import { useFetch } from '@hooks'
Línea 14... Línea 14...
14
import { useFetch } from '@hooks'
14
import { addNotification } from '@store/notification/notification.actions'
15
 
15
 
Línea 16... Línea 16...
16
import Widget from '@app/components/UI/Widget'
16
import Widget from '@components/UI/Widget'
17
import Button from '@app/components/UI/buttons/Buttons'
17
import Button from '@components/UI/buttons/Buttons'
18
 
18
 
19
const PeopleYouMayKnow = () => {
19
const PeopleYouMayKnow = () => {
Línea 51... Línea 51...
51
      )
51
      )
52
      refetch()
52
      refetch()
53
    })
53
    })
54
  }
54
  }
Línea -... Línea 55...
-
 
55
 
-
 
56
  if (!users.length) {
-
 
57
    return null
-
 
58
  }
55
 
59
 
56
  return (
60
  return (
57
    <Widget>
61
    <Widget>
58
      <Widget.Header
62
      <Widget.Header
59
        title={labels.connect_with + ':'}
63
        title={labels.connect_with + ':'}
Línea 65... Línea 69...
65
          )
69
          )
66
        }
70
        }
67
      />
71
      />
Línea 68... Línea 72...
68
 
72
 
69
      <Widget.Body>
-
 
70
        {!users.length ? (
-
 
71
          <Typography variant='body1' px={1}>
-
 
72
            {labels.datatable_empty}
-
 
73
          </Typography>
-
 
74
        ) : (
73
      <Widget.Body>
75
          <List sx={{ width: '100%', maxHeight: 200, overflow: 'auto' }}>
74
        <List sx={{ width: '100%', maxHeight: 200, overflow: 'auto' }}>
76
            {users.map(
75
          {users.map(
77
              ({ id, image, link_cancel, link_request, name, profile }) => (
76
            ({ id, image, link_cancel, link_request, name, profile }) => (
78
                <ListItemButton key={id}>
77
              <ListItemButton key={id}>
79
                  <ListItemAvatar>
78
                <ListItemAvatar>
80
                    <Avatar alt={`${name} image`} src={image} />
79
                  <Avatar alt={`${name} image`} src={image} />
81
                  </ListItemAvatar>
80
                </ListItemAvatar>
82
 
81
 
83
                  <ListItemText primary={name} />
82
                <ListItemText primary={name} />
84
 
83
 
85
                  {link_request && (
84
                {link_request && (
86
                    <Button
85
                  <Button
87
                      color='primary'
86
                    color='primary'
88
                      onClick={() => handleConnect(link_request)}
87
                    onClick={() => handleConnect(link_request)}
89
                    >
88
                  >
90
                      {labels.connect}
89
                    {labels.connect}
91
                    </Button>
90
                  </Button>
92
                  )}
91
                )}
93
                  {link_cancel && (
92
                {link_cancel && (
94
                    <Button
93
                  <Button
95
                      color='secondary'
94
                    color='secondary'
96
                      onClick={() => handleConnect(link_cancel)}
95
                    onClick={() => handleConnect(link_cancel)}
97
                    >
96
                  >
98
                      {labels.cancel}
97
                    {labels.cancel}
99
                    </Button>
98
                  </Button>
100
                  )}
99
                )}
101
                </ListItemButton>
100
              </ListItemButton>
102
              )
101
            )
103
            )}
102
          )}
104
          </List>
-
 
105
        )}
103
        </List>
106
      </Widget.Body>
104
      </Widget.Body>
107
    </Widget>
105
    </Widget>
108
  )
106
  )