diff --git a/web/src/app/containers/Base.js b/web/src/app/containers/Base.js index 9b24dcf..a33a66a 100644 --- a/web/src/app/containers/Base.js +++ b/web/src/app/containers/Base.js @@ -132,7 +132,7 @@ class Base extends React.Component { - {viewer.member.userName} + {viewer.member.fullName} }> diff --git a/web/src/app/containers/Circle.js b/web/src/app/containers/Circle.js index 6f8f6ac..6d7e703 100644 --- a/web/src/app/containers/Circle.js +++ b/web/src/app/containers/Circle.js @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react' import { graphql, compose } from 'react-apollo' import gql from 'graphql-tag' import { Link } from 'react-router-dom' -import { Container, Header, Segment, Form, Button, Grid, Menu, Card, List, Table, Popup, Icon, Dropdown, Label, TextArea } from 'semantic-ui-react' +import { Container, Header, Segment, Form, Button, Grid, Menu, Card, List, Table, Popup, Icon, Dropdown, Label, TextArea, Accordion } from 'semantic-ui-react' import moment from 'moment' import marked from 'marked' @@ -182,7 +182,11 @@ class Circle extends React.Component { - {d.member.userName} + + {d.member.userName} + + } /> @@ -204,7 +208,11 @@ class Circle extends React.Component { - {d.member.userName} + + {d.member.userName} + + } /> @@ -252,7 +260,11 @@ class Circle extends React.Component { filler = - {member.userName} + + {member.userName} + + } /> if (moment.utc(roleMember.electionExpiration).isValid()) { expireInfo = 'expires on ' + moment.utc(roleMember.electionExpiration).format('L') @@ -310,6 +322,7 @@ class Circle extends React.Component { const roleType = r.roleType let fillers = [] + let extras = [] if (roleType === 'normal') { for (let i = 0, len = r.roleMembers.length; i < len; i++) { // Only display max 3 fillers @@ -322,22 +335,60 @@ class Circle extends React.Component { focusString = ` (${focus})` } const memberLink = Util.memberUrl(member.uid, timeLine) - fillers.push( + extras.push( - {member.userName} + + {member.userName} + + } /> {focusString} ) } - if (fillers.length === 0) { - /* TODO(sgotti) limit showed fillers when exceeding a choosed number and show a "more" button */ + + if (r.roleMembers.length === 0) { fillers.push(
no members assigned to role
) + } else { + fillers.push({extras}) } - if (r.roleMembers.length > 3) { + + if (r.roleMembers.length > 3) { // Other members accordion + extras = [] const moreFillersCount = r.roleMembers.length - 3 - fillers.push(
... {moreFillersCount} other {moreFillersCount > 1 ? 'members' : 'member' }
) + for (let i = 3, len = r.roleMembers.length; i < len; i++) { + let focus = r.roleMembers[i].focus + let focusString = '' + if (focus) { + focusString = ` (${focus})` + } + let extramember = r.roleMembers[i].member + const extramemberLink = Util.memberUrl(extramember.uid, timeLine) + extras.push( + + + + + {extramember.userName} + + } /> + + {focusString} + ) + } + fillers.push( + + {moreFillersCount} other {moreFillersCount > 1 ? 'members' : 'member' } + + + {extras} + + + + ) } } @@ -357,13 +408,16 @@ class Circle extends React.Component { const memberLink = Util.memberUrl(leadlinkMember.uid, timeLine) fillers.push( - - - - {leadlinkMember.userName} - - (Lead Link) - ) + + + + + {leadlinkMember.fullName} + + (Lead Link) + + + ) } else { fillers.push(
no leadlink assigned
) } @@ -400,9 +454,7 @@ class Circle extends React.Component { - - {fillers} - + {fillers} @@ -441,7 +493,11 @@ class Circle extends React.Component { - {t.member.userName} + + {t.member.userName} + + } /> @@ -599,7 +655,11 @@ class Circle extends React.Component { - {e.issuer.userName} + + {e.issuer.userName} + + } /> {' did some changes'} diff --git a/web/src/app/containers/CircleSetCoreRoleMember.js b/web/src/app/containers/CircleSetCoreRoleMember.js index 26b85c2..26d0775 100644 --- a/web/src/app/containers/CircleSetCoreRoleMember.js +++ b/web/src/app/containers/CircleSetCoreRoleMember.js @@ -1,7 +1,7 @@ import React, { PropTypes } from 'react' import { graphql, compose } from 'react-apollo' import gql from 'graphql-tag' -import { Modal, Container, Form, Button, Table, Icon, Message, Divider } from 'semantic-ui-react' +import { Modal, Container, Form, Button, Table, Icon, Message, Divider, Popup } from 'semantic-ui-react' import moment from 'moment' import { withError } from '../modules/Error' @@ -131,7 +131,11 @@ class CircleSetCoreRoleMember extends React.Component { { role.roleMembers.map(roleMember => ( - {roleMember.member.userName} + + {roleMember.member.UserName} + + } /> {role.roleType !== 'leadlink' && @@ -221,6 +225,7 @@ const CoreRoleMemberQuery = gql` member { uid userName + fullName } electionExpiration } diff --git a/web/src/app/containers/MemberTensions.js b/web/src/app/containers/MemberTensions.js index 1bf8db3..866ff4c 100644 --- a/web/src/app/containers/MemberTensions.js +++ b/web/src/app/containers/MemberTensions.js @@ -100,6 +100,7 @@ const ViewerQuery = gql` member { uid userName + fullName circles { role { uid diff --git a/web/src/app/containers/RolePage.js b/web/src/app/containers/RolePage.js index 6414519..6429872 100644 --- a/web/src/app/containers/RolePage.js +++ b/web/src/app/containers/RolePage.js @@ -114,6 +114,7 @@ const RolePageQuery = gql` member { uid userName + fullName } isCoreMember isDirectMember @@ -129,6 +130,7 @@ const RolePageQuery = gql` member { uid userName + fullName } focus electionExpiration @@ -141,6 +143,7 @@ const RolePageQuery = gql` member { uid userName + fullName } } } @@ -149,6 +152,7 @@ const RolePageQuery = gql` member { uid userName + fullName roles { role { uid @@ -173,6 +177,7 @@ const RolePageQuery = gql` member { uid userName + fullName } focus electionExpiration @@ -186,6 +191,7 @@ const RolePageQuery = gql` member { uid userName + fullName } } } @@ -211,6 +217,7 @@ const RoleEventsQuery = gql` issuer { uid userName + fullName } changedRoles { changeType @@ -283,6 +290,7 @@ const ViewerQuery = gql` member { uid userName + fullName circles { role { uid diff --git a/web/src/app/containers/RoleSetMembers.js b/web/src/app/containers/RoleSetMembers.js index 83a566e..ebf2948 100644 --- a/web/src/app/containers/RoleSetMembers.js +++ b/web/src/app/containers/RoleSetMembers.js @@ -162,6 +162,7 @@ const RoleSetMemberQuery = gql` member { uid userName + fullName } focus } diff --git a/web/src/app/containers/SearchPage.js b/web/src/app/containers/SearchPage.js index 8bde3b3..e38c51f 100644 --- a/web/src/app/containers/SearchPage.js +++ b/web/src/app/containers/SearchPage.js @@ -2,7 +2,7 @@ import React, { PropTypes } from 'react' import { graphql, compose } from 'react-apollo' import gql from 'graphql-tag' import { Link } from 'react-router-dom' -import { Container, Label, Segment, Message } from 'semantic-ui-react' +import { Container, Label, Segment, Message, Popup } from 'semantic-ui-react' import Util from '../modules/Util' import Avatar from '../components/Avatar' @@ -70,7 +70,11 @@ class SearchPage extends React.Component { - {hit.fields.UserName} + + {hit.fields.UserName} + + } /> diff --git a/web/src/app/containers/UpdateMemberPassword.js b/web/src/app/containers/UpdateMemberPassword.js index 8696a3a..5d00a32 100644 --- a/web/src/app/containers/UpdateMemberPassword.js +++ b/web/src/app/containers/UpdateMemberPassword.js @@ -176,6 +176,7 @@ const ViewerQuery = gql` uid isAdmin userName + fullName } } } diff --git a/web/src/app/graphql/ViewerQuery.js b/web/src/app/graphql/ViewerQuery.js index 5bd4952..99c20a8 100644 --- a/web/src/app/graphql/ViewerQuery.js +++ b/web/src/app/graphql/ViewerQuery.js @@ -7,6 +7,7 @@ const ViewerQuery = gql` uid isAdmin userName + fullName circles { role { uid