Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

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

Rev 5473 Rev 5475
Línea 1... Línea 1...
1
import React, { useEffect, useState } from 'react'
1
import React, { useEffect } from 'react'
2
import parse from 'html-react-parser'
2
import parse from 'html-react-parser'
3
import { useDispatch } from 'react-redux'
3
import { useDispatch } from 'react-redux'
4
import { setIntlLabels } from '../../../../redux/intl/intl.action'
4
import { setIntlLabels } from '../../../../redux/intl/intl.action'
-
 
5
 
5
import EmptySection from '../../../../shared/empty-section/EmptySection'
6
import EmptySection from '../../../../shared/empty-section/EmptySection'
6
import SuggestWidget from '../../../../shared/helpers/my-groups-helper/SuggestWidget'
7
import SuggestWidget from '../../../../shared/helpers/my-groups-helper/SuggestWidget'
7
import ProfileInfo from '../../../components/ProfileInfo'
8
import ProfileInfo from '../../../components/ProfileInfo'
8
import Overview from '../../../components/overview/Overview'
9
import Overview from '../../../components/overview/Overview'
-
 
10
import Experiences from '../../../components/experiences/Experiences'
Línea 9... Línea 11...
9
 
11
 
10
const View = ({
12
const View = ({
11
  userIdEncrypted,
13
  userIdEncrypted,
12
  cover,
14
  cover,
Línea 23... Línea 25...
23
  RequestConnectionUrl,
25
  RequestConnectionUrl,
24
  profileId,
26
  profileId,
25
  labels,
27
  labels,
26
  ...profileProps
28
  ...profileProps
27
}) => {
29
}) => {
28
  const [monthOptions, setMonthOptions] = useState({})
-
 
29
  const dispatch = useDispatch()
30
  const dispatch = useDispatch()
Línea 30... Línea 31...
30
 
31
 
31
  useEffect(() => {
-
 
32
    setMonthOptions(
-
 
33
      months.reduce((obj, item, i) => ({ ...obj, [i + 1]: item }), {})
-
 
34
    )
-
 
35
  }, [months])
-
 
36
 
-
 
37
  useEffect(() => {
32
  useEffect(() => {
38
    dispatch(setIntlLabels(labels))
33
    dispatch(setIntlLabels(labels))
Línea 39... Línea 34...
39
  }, [])
34
  }, [])
40
 
35
 
Línea 56... Línea 51...
56
          cancelUrl={CancelConnectionUrl}
51
          cancelUrl={CancelConnectionUrl}
57
          connectUrl={RequestConnectionUrl}
52
          connectUrl={RequestConnectionUrl}
58
        />
53
        />
59
        <section className="feed-section">
54
        <section className="feed-section">
60
          <Overview overview={overview} userId={userIdEncrypted} />
55
          <Overview overview={overview} userId={userIdEncrypted} />
61
          <div className="user-profile-extended-ov st2">
-
 
62
            <h3>Experiencia</h3>
56
          <Experiences
63
            {!userExperiences.length ? (
57
            userId={userIdEncrypted}
64
              <EmptySection align="left" message={labels.EMPTY} />
-
 
65
            ) : (
-
 
66
              <span id="experience-records">
-
 
67
                {userExperiences.map(
58
            experiences={userExperiences}
68
                  (
-
 
69
                    {
-
 
70
                      company,
-
 
71
                      title,
-
 
72
                      from_month,
-
 
73
                      from_year,
-
 
74
                      to_month,
59
            months={months}
75
                      to_year,
-
 
76
                      industry,
-
 
77
                      size,
-
 
78
                      formatted_adress,
-
 
79
                      description,
-
 
80
                    },
-
 
81
                    id
-
 
82
                  ) => (
-
 
83
                    <div key={id}>
-
 
84
                      {id >= 1 ? <hr /> : ''}
-
 
85
                      <p>{company}</p>
-
 
86
                      <p>{title}</p>
-
 
87
                      <p>
-
 
88
                        {`${monthOptions[from_month]} ${from_year}`} -{' '}
-
 
89
                        {to_year
-
 
90
                          ? `${monthOptions[to_month]} ${to_year}`
-
 
91
                          : 'Actual'}
-
 
92
                      </p>
-
 
93
                      <p>{`${industry} / ${size}`}</p>
-
 
94
                      <p>{formatted_adress}</p>
-
 
95
                      {description && parse(description)}
-
 
96
                    </div>
-
 
97
                  )
-
 
98
                )}
-
 
99
              </span>
-
 
100
            )}
-
 
101
          </div>
60
          />
102
          <div className="user-profile-extended-ov">
61
          <div className="user-profile-extended-ov">
103
            <h3>{labels.EDUCATION}</h3>
62
            <h3>{labels.EDUCATION}</h3>
104
            {!userEducations.length ? (
63
            {!userEducations.length ? (
105
              <EmptySection align="left" message={labels.EMPTY} />
64
              <EmptySection align="left" message={labels.EMPTY} />
106
            ) : (
65
            ) : (