Proyectos de Subversion LeadersLinked - SPA

Rev

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

Rev 960 Rev 961
Línea 3... Línea 3...
3
import { axios } from '../../../utils'
3
import { axios } from '../../../utils'
4
import { useSelector } from 'react-redux'
4
import { useSelector } from 'react-redux'
5
import { Avatar, Box } from '@mui/material'
5
import { Avatar, Box } from '@mui/material'
6
import styled from 'styled-components'
6
import styled from 'styled-components'
Línea -... Línea 7...
-
 
7
 
7
 
8
import { ButtonPrimary } from '@buttons'
8
import StyledContainer from '../WidgetLayout'
9
import StyledContainer from '../WidgetLayout'
Línea 9... Línea 10...
9
import EmptySection from '../../UI/EmptySection'
10
import EmptySection from '../../UI/EmptySection'
10
 
11
 
Línea 24... Línea 25...
24
  gap: 0.5rem;
25
  gap: 0.5rem;
25
  width: 100%;
26
  width: 100%;
26
  justify-content: space-between;
27
  justify-content: space-between;
27
`
28
`
Línea -... Línea 29...
-
 
29
 
-
 
30
const WidgetContent = styled.div`
-
 
31
  display: inline-flex;
-
 
32
  align-items: center;
-
 
33
  gap: 0.5rem;
-
 
34
  overflow: hidden;
-
 
35
  max-width: 100%;
-
 
36
  h2 {
-
 
37
    text-overflow: ellipsis;
-
 
38
    white-space: nowrap;
-
 
39
    overflow: hidden;
-
 
40
  }
-
 
41
`
28
 
42
 
29
const SuggestWidget = ({
43
const SuggestWidget = ({
30
  title = 'Mis Grupos:',
44
  title = 'Mis Grupos:',
31
  url = '/helpers/my-groups',
45
  url = '/helpers/my-groups',
32
  btnLabelAccept = 'Ver'
46
  btnLabelAccept = 'Ver'
Línea 64... Línea 78...
64
      </WidgetHeader>
78
      </WidgetHeader>
Línea 65... Línea 79...
65
 
79
 
66
      <Box
80
      <Box
67
        display='flex'
81
        display='flex'
68
        flexDirection='column'
82
        flexDirection='column'
69
        maxHeight='210'
83
        maxHeight='201'
70
        overflow='auto'
84
        overflow='auto'
71
      >
85
      >
72
        {data.length ? (
86
        {data.length ? (
73
          items.map((suggest) => (
87
          items.map((suggest) => (
Línea 89... Línea 103...
89
  const { name, profile, image } = suggest
103
  const { name, profile, image } = suggest
90
  const labels = useSelector(({ intl }) => intl.labels)
104
  const labels = useSelector(({ intl }) => intl.labels)
Línea 91... Línea 105...
91
 
105
 
92
  return (
106
  return (
93
    <WidgetItem>
107
    <WidgetItem>
94
      <div className='d-inline-flex align-items-center'>
108
      <WidgetContent>
95
        <Avatar
109
        <Avatar
96
          sx={{ width: 60, height: 60 }}
110
          sx={{ width: 50, height: 50 }}
97
          src={image}
111
          src={image}
98
          alt={`${name} profile image`}
112
          alt={`${name} profile image`}
-
 
113
        />
-
 
114
        <h2 title={name}>{name}</h2>
Línea 99... Línea -...
99
        />
-
 
100
 
115
      </WidgetContent>
101
        <h4 className='break-ellipsis' title={name}>
-
 
102
          {name}
-
 
103
        </h4>
-
 
104
      </div>
-
 
105
 
116
 
106
      <Link to={profile} className='btn btn-primary ml-auto'>
117
      <Link to={profile}>
107
        {btnLabelAccept || labels.view_profile}
118
        <ButtonPrimary label={btnLabelAccept || labels.view_profile} />
108
      </Link>
119
      </Link>
109
    </WidgetItem>
120
    </WidgetItem>