diff --git a/src/client/components/CardList/index.jsx b/src/client/components/CardList/index.jsx index 06e5b00a3..67229a1a3 100644 --- a/src/client/components/CardList/index.jsx +++ b/src/client/components/CardList/index.jsx @@ -23,11 +23,12 @@ class CardList extends React.Component { } render () { - const { header, children } = this.props + const { header, headerRightComponent, children, extraClass } = this.props return ( -
+
{header &&
{header}
} + {headerRightComponent &&
{headerRightComponent}
}
    {children}
@@ -39,7 +40,9 @@ class CardList extends React.Component { CardList.propTypes = { header: PropTypes.string, - children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired + headerRightComponent: PropTypes.element, + children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired, + extraClass: PropTypes.string } export default CardList diff --git a/src/client/components/Nav/Sidebar/index.jsx b/src/client/components/Nav/Sidebar/index.jsx index 6f6438c23..6c9cfbec0 100644 --- a/src/client/components/Nav/Sidebar/index.jsx +++ b/src/client/components/Nav/Sidebar/index.jsx @@ -169,13 +169,15 @@ class Sidebar extends React.Component { {sessionUser && Helpers.canUser('teams:view') && ( )} - + {sessionUser && Helpers.canUser('departments:view') && ( + + )} {sessionUser && Helpers.canUser('reports:view') && ( + (this.groupPermGroup = i)} + title={'Groups'} + role={this.props.role} + grants={this.groupGrants} + subtitle={'Group Permissions'} + /> (this.teamPermGroup = i)} title={'Teams'} @@ -226,11 +236,11 @@ class PermissionBody extends React.Component { subtitle={'Team Permissions'} /> (this.groupPermGroup = i)} - title={'Groups'} + ref={i => (this.departmentPermGroup = i)} + title={'Departments'} role={this.props.role} - grants={this.groupGrants} - subtitle={'Group Permissions'} + grants={this.departmentGrants} + subtitle={'Department Permissions'} /> (this.reportPermGroup = i)} diff --git a/src/client/containers/Settings/Tickets/index.jsx b/src/client/containers/Settings/Tickets/index.jsx index 7d087d19b..873d4befc 100644 --- a/src/client/containers/Settings/Tickets/index.jsx +++ b/src/client/containers/Settings/Tickets/index.jsx @@ -359,83 +359,93 @@ class TicketsSettings extends React.Component { } footer={
    } > - + {this.props.tagsSettings.tags.size < 1 && (

    No Tags Found

    )} - {this.props.tagsSettings.tags.map(i => { - return ( - - - - - - -
    - {i.get('name')} -
    -
    - - -
diff --git a/src/client/containers/Teams/index.jsx b/src/client/containers/Teams/index.jsx index 16fbce7f3..46667cc62 100644 --- a/src/client/containers/Teams/index.jsx +++ b/src/client/containers/Teams/index.jsx @@ -62,50 +62,58 @@ class TeamsContainer extends React.Component { }) } + onEditTeamClick (e, id) { + e.preventDefault() + console.log(id) + } + render () { const items = this.props.teamsState.teams.map(team => { let actionMenu = [] if (helpers.canUser('teams:delete', true)) actionMenu.push() return ( - - -

{team.get('name')}

-
- } - content={ -
-
Members
- {team.get('members').map(member => { - const memberImage = member.get('image') ? member.get('image') : 'defaultProfile.jpg' - return ( -
-
- {member.get('fullname')} -
-
- ) - })} -
- } - /> - + this.onEditTeamClick(e, team.get('_id'))}>Edit Team} + extraClass={'mb-50'} + > + {team.get('members').map(member => { + const inputId = `${team.get('_id')}_${member.get('_id')}` + const profilePic = member.get('image') || 'defaultProfile.jpg' + return ( + +
+ + +
+
+ {member.get('username')} +
+
+ + {member.get('fullname')} + +
+
+ ) + })} +
) }) return ( @@ -128,39 +136,7 @@ class TeamsContainer extends React.Component { > - - -
Test
-
- -
- - -
-
- ProfilePicture -
-
- - Chris Brame - -
-
-
+ {items}
diff --git a/src/public/js/pages/tickets.js b/src/public/js/pages/tickets.js index a9e59d4d6..81cfebacb 100644 --- a/src/public/js/pages/tickets.js +++ b/src/public/js/pages/tickets.js @@ -38,7 +38,7 @@ define('pages/tickets', [ { width: '50px', targets: 0 }, { width: '50px', targets: 1 }, { width: '65px', targets: 2 }, - { width: '20%', targets: 3 }, + { width: '23%', targets: 3 }, { width: '110px', targets: 4 } ], order: [[2, 'desc']], diff --git a/src/sass/partials/cardlist.sass b/src/sass/partials/cardlist.sass index e8ea5877f..dcec17d77 100644 --- a/src/sass/partials/cardlist.sass +++ b/src/sass/partials/cardlist.sass @@ -22,6 +22,10 @@ position: absolute top: -24px left: 0 + .md-card-list-header-right + @extend .md-card-list-header + left: auto + right: 0 .md-card-list margin: 48px 0 0 0 position: relative