Rev 5475 | Rev 5480 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
import React, { useEffect } from 'react'import parse from 'html-react-parser'import { useDispatch } from 'react-redux'import { setIntlLabels } from '../../../../redux/intl/intl.action'import EmptySection from '../../../../shared/empty-section/EmptySection'import SuggestWidget from '../../../../shared/helpers/my-groups-helper/SuggestWidget'import ProfileInfo from '../../../components/ProfileInfo'import Overview from '../../../components/overview/Overview'import Experiences from '../../../components/experiences/Experiences'import Educations from '../../../components/educations/Educations'const View = ({userIdEncrypted,cover,overview,userExperiences,userEducations,formatted_address,months,userLanguages,userSkills,userAptitudes,userHobbiesAndInterests,CancelConnectionUrl,RequestConnectionUrl,profileId,labels,...profileProps}) => {const dispatch = useDispatch()useEffect(() => {dispatch(setIntlLabels(labels))}, [])return (<><section className="cover-sec"><imgid="user-cover-img"src={`/storage/type/user-cover/code/${userIdEncrypted}/${cover ? `filename/${cover}` : ''}`}alt=""/></section><main className="main-section-data container px-0"><ProfileInfo{...profileProps}id={userIdEncrypted}cancelUrl={CancelConnectionUrl}connectUrl={RequestConnectionUrl}/><section className="feed-section"><Overview overview={overview} userId={userIdEncrypted} /><ExperiencesuserId={userIdEncrypted}experiences={userExperiences}months={months}/><Educations educations={userEducations} userId={userIdEncrypted} /><div className="user-profile-extended-ov"><h3>{labels.EDUCATION}</h3>{!userEducations.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<span id="education-records">{userEducations.map(({degree,university,from_year,to_year,field_of_study,formatted_address,description,},id) => (<div key={id}>{id >= 1 && <hr />}<p>{degree}</p><p>{university}</p><p>{`${from_year} - ${to_year || 'Actual'}`}</p>{field_of_study && <p>{field_of_study}</p>}<p>{formatted_address}</p>{description && <p>{parse(description)}</p>}</div>))}</span>)}</div><div className="user-profile-extended-ov"><h3>{labels.LOCATION}</h3>{!formatted_address ? (<EmptySection align="left" message={labels.EMPTY} />) : (<p id="location-formatted_address">{formatted_address}</p>)}</div><div className="user-profile-extended-ov"><h3>{labels.LANGUAGES}</h3>{!userLanguages.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-languages">{userLanguages.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.SKILLS}</h3>{!userSkills.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userSkills.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.APTITUDES}</h3>{!userAptitudes.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userAptitudes.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div><div className="user-profile-extended-ov"><h3>{labels.HOBBIES_AND_INTERESTS}</h3>{!userHobbiesAndInterests.length ? (<EmptySection align="left" message={labels.EMPTY} />) : (<ul id="list-skills">{userHobbiesAndInterests.map(({ name, value }) => (<li key={value}><a href="#" title="">{name}</a></li>))}</ul>)}</div></section><SuggestWidgeturl={`/helpers/people-viewed-profile/${profileId}`}btnLabelAccept="Ver perfil"title="Quien ha visitado esta perfil"/></main></>)}export default View