Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
4250 stevensc 1
/* eslint-disable react/prop-types */
2
import React from 'react'
3
 
4
const ProfileSection = ({
5
  user_uuid,
6
  image,
7
  name,
8
  total_members,
9
  accessibility,
10
  link_inmail,
11
  link_accept,
12
  link_cancel,
13
  link_request,
14
  link_leave,
15
  handleActionLink,
16
}) => {
17
 
18
  return (
19
    <div className="user_profile border-gray overflow-hidden m-0 p-1 mb-2">
20
      <div className="user-pro-img">
21
        <img
22
          src={`/storage/type/group/code/${user_uuid}/${image ? `filename/${image}` : ""}`}
23
          alt="profile-image"
24
        />
25
      </div>
26
      <div className="user_pro_status">
27
        <h1 className="font-weight-bold" style={{ fontSize: '1.5rem' }} >{name}</h1>
28
        <ul className="flw-status">
29
          <div className="container horizontal-list">
30
            <div className="row ">
31
              {link_inmail &&
32
                <a
33
                  href={link_inmail || '#'}
34
                  className="btn btn-primary"
35
                >
36
                  Contactar con el Administrador
37
                </a>
38
              }
39
              <div className="members_count">
40
                <b style={{ fontSize: '1rem' }} >{total_members}</b>
41
                <p>Miembros</p>
42
              </div>
43
              {link_accept &&
44
                <button
45
                  onClick={() => handleActionLink(link_accept)}
46
                  className="btn btn-primary"
47
                  title=""
48
                >
49
                  <span className="ellipsis">
50
                    Aceptar invitacion
51
                  </span>
52
                </button>
53
              }
54
              {link_cancel &&
55
                <button
56
                  onClick={() => handleActionLink(link_cancel)}
57
                  className="btn btn-primary"
58
                  title=""
59
                >
60
                  <span className="ellipsis">
61
                    Cancelar invitacion
62
                  </span>
63
                </button>
64
              }
65
              {link_leave &&
66
                <button
67
                  onClick={() => handleActionLink(link_leave)}
68
                  className="btn btn-primary"
69
                  title=""
70
                >
71
                  <span className="ellipsis">
72
                    Abandonar grupo
73
                  </span>
74
                </button>
75
              }
76
              {link_request &&
77
                <button
78
                  onClick={() => handleActionLink(link_request)}
79
                  className="btn btn-primary"
80
                  title=""
81
                >
82
                  {accessibility === 'Auto unirse' ? 'Unirse' : 'Solicitar membresia'}
83
                </button>
84
              }
85
            </div>
86
          </div>
87
        </ul>
88
      </div>
89
    </div>
90
  )
91
}
92
 
93
export default ProfileSection