diff --git a/src/shared/components/ProfilePage/Stats/index.jsx b/src/shared/components/ProfilePage/Stats/index.jsx index 96432981dd..d06275fd96 100644 --- a/src/shared/components/ProfilePage/Stats/index.jsx +++ b/src/shared/components/ProfilePage/Stats/index.jsx @@ -8,6 +8,8 @@ import PT from 'prop-types'; import { Link } from 'react-router-dom'; import { getRatingColor } from 'utils/tc'; import Th from 'assets/images/th.svg'; +import DefaultPortrait from 'assets/images/ico-user-default.svg'; +import LeftArrow from 'assets/images/arrow-prev.svg'; import { shouldShowGraph, getHistory, getSubTrackStats, getSummary, getDetails, } from 'utils/memberStats'; @@ -64,6 +66,11 @@ class ProfileStats extends React.Component { const subTrackStats = getSubTrackStats(stats, track, subTrack); const subTrackSummary = getSummary(stats, track, subTrack) || []; const subTrackDetails = getDetails(stats, track, subTrack) || []; + const ratingObj = subTrackSummary.filter(k => k.label === 'rating'); + let subTrackRating = ratingObj && ratingObj[0] ? ratingObj[0].value : 0; + if (subTrackRating === 0 || !subTrackRating) { // if subtrack has no rating, pick default rating + subTrackRating = info.maxRating ? info.maxRating.rating : 0; + } if (track === 'DEVELOP') { const reliability = subTrackSummary.find(stat => stat.label === 'reliability'); @@ -85,6 +92,10 @@ class ProfileStats extends React.Component {
+ + + +  

{subTrack.replace('FIRST_2_FINISH', 'FIRST2FINISH').replace(/_/g, ' ')}

@@ -128,6 +139,25 @@ Active Challenges }
    + { + subTrackSummary + && ( +
  • +
    + { info.photoURL ? Member Portait : } +
    +
    + + {info.handle || '-'} + +
    +
  • + ) + } { subTrackSummary.map(({ label, value, link }) => (
  • diff --git a/src/shared/components/ProfilePage/Stats/styles.scss b/src/shared/components/ProfilePage/Stats/styles.scss index 7fa9382d8d..88da5d68fd 100644 --- a/src/shared/components/ProfilePage/Stats/styles.scss +++ b/src/shared/components/ProfilePage/Stats/styles.scss @@ -177,6 +177,10 @@ .page-info { display: flex; justify-content: center; + + .left-arrow { + margin: 15px; + } } } @@ -196,6 +200,13 @@ } } + img.profile-circle { + border-radius: 50%; + display: inline; + width: 140px; + height: 140px; + } + & + .develop { // move the cards up to compensate for size. Refactor of the component will make this obsolete! margin-top: -40px; @@ -230,6 +241,13 @@ } } + .valueHandle { + position: relative; + margin-bottom: 7px; + font-size: 18px; + color: #3d3d3d; + } + &:not(:first-child)::before { content: ""; top: 32px;