diff --git a/client/coral-admin/src/components/UserDetail.js b/client/coral-admin/src/components/UserDetail.js index ab609fbfb..2ff5efc1e 100644 --- a/client/coral-admin/src/components/UserDetail.js +++ b/client/coral-admin/src/components/UserDetail.js @@ -25,7 +25,15 @@ export default class UserDetail extends React.Component { toggleSelect: PropTypes.func.isRequired, bulkAccept: PropTypes.func.isRequired, bulkReject: PropTypes.func.isRequired, - toggleSelectAll: PropTypes.func.isRequired + toggleSelectAll: PropTypes.func.isRequired, + loading: PropTypes.bool.isRequired, + data: PropTypes.shape({ + refetch: PropTypes.func.isRequired, + }), + activeTab: PropTypes.string.isRequired, + selectedCommentIds: PropTypes.array.isRequired, + viewUserDetail: PropTypes.any.isRequired, + loadMore: PropTypes.any.isRequired } rejectThenReload = async (info) => { @@ -140,24 +148,22 @@ export default class UserDetail extends React.Component { - -

- Data represents the last six months of activity -

-
0) ? cn(styles.bulkActionHeader, styles.selected) : styles.bulkActionHeader}> { @@ -186,7 +191,7 @@ export default class UserDetail extends React.Component { onClick={this.bulkRejectThenReload} minimal /> - {`${selectedCommentIds.length} comments selected`} + {selectedCommentIds.length} comments selected
) } diff --git a/client/coral-admin/src/containers/UserDetail.js b/client/coral-admin/src/containers/UserDetail.js index 3feee87a9..3383af1b5 100644 --- a/client/coral-admin/src/containers/UserDetail.js +++ b/client/coral-admin/src/containers/UserDetail.js @@ -154,7 +154,7 @@ export const withUserDetailQuery = withQuery(gql` } ${getSlotFragmentSpreads(slots, 'user')} } - totalComments: commentCount(query: {author_id: $author_id}) + totalComments: commentCount(query: {author_id: $author_id, statuses: []}) rejectedComments: commentCount(query: {author_id: $author_id, statuses: [REJECTED]}) comments: comments(query: { author_id: $author_id, diff --git a/client/coral-admin/src/routes/Community/components/Table.js b/client/coral-admin/src/routes/Community/components/Table.js index 60621080e..28b20b82f 100644 --- a/client/coral-admin/src/routes/Community/components/Table.js +++ b/client/coral-admin/src/routes/Community/components/Table.js @@ -1,8 +1,8 @@ import React from 'react'; -import {SelectField, Option} from 'react-mdl-selectfield'; import styles from '../components/Table.css'; import t from 'coral-framework/services/i18n'; import PropTypes from 'prop-types'; +import {Dropdown, Option} from 'coral-ui'; import cn from 'classnames'; const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onCommenterStatusChange, viewUserDetail}) => ( @@ -13,6 +13,7 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme onHeaderClickHandler({field: header.field})}> {header.title} @@ -30,26 +31,24 @@ const Table = ({headers, commenters, onHeaderClickHandler, onRoleChange, onComme {row.created_at} - onCommenterStatusChange(row.id, status)}> - - - + onCommenterStatusChange(row.id, status)}> + - onRoleChange(row.id, role)}> - - - - - +