diff --git a/client/src/App.js b/client/src/App.js index 652531151..524450afc 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -155,7 +155,11 @@ class App extends Component { >>>>>> feature/client-refactor-react render={props => } /> >>>>>> feature/client-refactor-react id name slug diff --git a/client/src/views/about/index.js b/client/src/views/about/index.js index 5f4323210..08fb90fb2 100644 --- a/client/src/views/about/index.js +++ b/client/src/views/about/index.js @@ -34,12 +34,20 @@ const About = ({ classes }) => (
>>>>>> feature/client-refactor-react align='center' color='textPrimary' gutterBottom > +<<<<<<< HEAD Collaborate. Innovate. Evolve. +======= + Welcome to Advanced Algos Teams! +>>>>>>> feature/client-refactor-react ( color='textSecondary' component='h3' > +<<<<<<< HEAD Welcome to the Advanced Algos Teams Module +======= + This module is responsible for managing teams and their members across the Advanced Algos system. You can browser teams and their details, and with an account, create and manage your own teams. + + + Development Status
This module is is currently under heavy development. Implementation started 1st of September 2018 and this is the result of the 1st sprint of 2 weeks of work. +
+ + What can you do?
Basic team creation and management. +
+ + What is next?
+
    +
  1. Managing team profile images.
  2. +
  3. Managing team members - inviting members and administrating roles
  4. +
  5. More detailed team profiles + allowing members to apply to recruiting teams
  6. +
+>>>>>>> feature/client-refactor-react
diff --git a/client/src/views/common/MessageCard.js b/client/src/views/common/MessageCard.js index 9c45891d0..1216aa4f7 100644 --- a/client/src/views/common/MessageCard.js +++ b/client/src/views/common/MessageCard.js @@ -27,7 +27,13 @@ export const MessageCard = ({ classes, message, children }) => (
+<<<<<<< HEAD {message} +======= + + {message} + +>>>>>>> feature/client-refactor-react {children}
diff --git a/client/src/views/dashboard/FinancialBeings.js b/client/src/views/dashboard/FinancialBeings.js new file mode 100644 index 000000000..be6ac2aba --- /dev/null +++ b/client/src/views/dashboard/FinancialBeings.js @@ -0,0 +1,30 @@ +import React from 'react' +import PropTypes from 'prop-types' + +import Typography from '@material-ui/core/Typography' +import { withStyles } from '@material-ui/core/styles' + +import { MessageCard } from '../common/' + +const styles = theme => ({ + tableContainer: { + height: 320 + } +}) + +const FinancialBeings = ({ classes }) => ( +
+ + Financial Beings + +
+ +
+
+) + +FinancialBeings.propTypes = { + classes: PropTypes.object.isRequired +} + +export default withStyles(styles)(FinancialBeings) diff --git a/client/src/views/dashboard/TeamMembers.js b/client/src/views/dashboard/TeamMembers.js index 8b2b43aeb..643ca44e2 100644 --- a/client/src/views/dashboard/TeamMembers.js +++ b/client/src/views/dashboard/TeamMembers.js @@ -15,7 +15,11 @@ const styles = theme => ({ const TeamMembers = ({ classes }) => (
+<<<<<<< HEAD Members +======= + Team Members +>>>>>>> feature/client-refactor-react
diff --git a/client/src/views/dashboard/components/CreateTeamDialog.js b/client/src/views/dashboard/components/CreateTeamDialog.js index 4db5b5638..a1d0c2877 100644 --- a/client/src/views/dashboard/components/CreateTeamDialog.js +++ b/client/src/views/dashboard/components/CreateTeamDialog.js @@ -11,11 +11,16 @@ import FormHelperText from '@material-ui/core/FormHelperText' import Dialog from '@material-ui/core/Dialog' import DialogActions from '@material-ui/core/DialogActions' import DialogContent from '@material-ui/core/DialogContent' +<<<<<<< HEAD import DialogContentText from '@material-ui/core/DialogContentText' import DialogTitle from '@material-ui/core/DialogTitle' import Typography from '@material-ui/core/Typography' import { getItem } from '../../../utils/local-storage' +======= +import DialogTitle from '@material-ui/core/DialogTitle' +import Typography from '@material-ui/core/Typography' +>>>>>>> feature/client-refactor-react import { isEmpty } from '../../../utils/js-helpers' import CREATE_TEAM from '../../../graphql/teams/CreateTeamMutation' @@ -74,7 +79,13 @@ export class CreateTeamDialog extends Component { let errors let loader = null if (loading) { +<<<<<<< HEAD loader = Submitting team... +======= + loader = ( + Submitting team... + ) +>>>>>>> feature/client-refactor-react } if (error) { errors = error.graphQLErrors.map(({ message }, i) => { @@ -88,7 +99,17 @@ export class CreateTeamDialog extends Component { } return (
+<<<<<<< HEAD Create a Team +<<<<<<< HEAD Team Name: (this.state.errors.name !== '' || error)}> +======= + +>>>>>>> feature/client-refactor-react +<<<<<<< HEAD {this.state.errors.name !== '' && ({this.state.errors.name})} {error && ({errors})} +======= + {this.state.errors.name !== '' && ( + {this.state.errors.name} + )} + {error && {errors}} +>>>>>>> feature/client-refactor-react {loader} @@ -120,9 +155,18 @@ export class CreateTeamDialog extends Component { +<<<<<<< HEAD @@ -153,6 +197,7 @@ export class CreateTeamDialog extends Component { } } +<<<<<<< HEAD async handleSubmit (e, createTeam, name) { e.preventDefault() const currentUser = await getItem('user') @@ -162,6 +207,14 @@ export class CreateTeamDialog extends Component { const slug = this.slugify(name) await createTeam({ variables: { name, slug, owner: authId } }) this.setState({ name: '' }) +======= + async handleSubmit (e, createTeam, name, authId) { + e.preventDefault() + console.log('createTeam submit: ', authId, name) + const slug = this.slugify(name) + await createTeam({ variables: { name, slug, owner: authId } }) + this.setState({ name: '', open: false }) +>>>>>>> feature/client-refactor-react } validate (data) { diff --git a/client/src/views/dashboard/components/DashTeam.js b/client/src/views/dashboard/components/DashTeam.js index 1213f7eb1..c9b86189e 100644 --- a/client/src/views/dashboard/components/DashTeam.js +++ b/client/src/views/dashboard/components/DashTeam.js @@ -42,7 +42,14 @@ export const DashTeam = ({ classes, user = null }) => { return ( +<<<<<<< HEAD Teams Manage Teams +======= + Teams{' '} + + Manage Teams + +>>>>>>> feature/client-refactor-react {({ loading, error, data }) => { diff --git a/client/src/views/dashboard/components/DashTeamItem.js b/client/src/views/dashboard/components/DashTeamItem.js index b5210e73c..c39cff76c 100644 --- a/client/src/views/dashboard/components/DashTeamItem.js +++ b/client/src/views/dashboard/components/DashTeamItem.js @@ -9,7 +9,12 @@ import Card from '@material-ui/core/Card' import CardContent from '@material-ui/core/CardContent' import CardMedia from '@material-ui/core/CardMedia' import CardActions from '@material-ui/core/CardActions' +<<<<<<< HEAD import Button from '@material-ui/core/Button' +======= + +import ManageTeamDetails from './ManageTeamDetails' +>>>>>>> feature/client-refactor-react const styles = theme => ({ card: { @@ -49,6 +54,7 @@ export const DashTeamItem = ({ classes, team }) => ( {team.createdAt} +<<<<<<< HEAD Members:6 @@ -56,6 +62,13 @@ export const DashTeamItem = ({ classes, team }) => ( +======= + Members: {team.members.length} + + + + +>>>>>>> feature/client-refactor-react
diff --git a/client/src/views/dashboard/components/DrawerLinks.js b/client/src/views/dashboard/components/DrawerLinks.js index 29321211e..1bbeb5733 100644 --- a/client/src/views/dashboard/components/DrawerLinks.js +++ b/client/src/views/dashboard/components/DrawerLinks.js @@ -16,8 +16,22 @@ const DashboardLink = props => const TeamsLink = props => const MembersLink = props => const SettingsLink = props => +<<<<<<< HEAD const DocumentationLink = props => const SupportLink = props => +======= +const FBLink = props => +const DocumentationLink = props => ( + +) +const SupportLink = props => ( + +) +>>>>>>> feature/client-refactor-react export const MainDrawerItems = (
@@ -39,7 +53,7 @@ export const MainDrawerItems = ( - + diff --git a/client/src/views/dashboard/components/ManageTeamDelete.js b/client/src/views/dashboard/components/ManageTeamDelete.js index 4cb3e3204..714ea123e 100644 --- a/client/src/views/dashboard/components/ManageTeamDelete.js +++ b/client/src/views/dashboard/components/ManageTeamDelete.js @@ -37,9 +37,13 @@ export class ManageTeamDelete extends Component { this.handleSubmit = this.handleSubmit.bind(this) this.state = { +<<<<<<< HEAD open: false, motto: '', description: '' +======= + open: false +>>>>>>> feature/client-refactor-react } } @@ -67,18 +71,27 @@ export class ManageTeamDelete extends Component { variables: { authId } } ]} +<<<<<<< HEAD update={(cache, { data: { deleteTeam } }) => { const data = cache.readQuery({ query: GET_TEAMS_BY_OWNER }) console.log('Mutation cache update: ', deleteTeam, data) data.getTeamsByOwner.push(deleteTeam) cache.writeQuery({ query: GET_TEAMS_BY_OWNER, data }) }} +======= +>>>>>>> feature/client-refactor-react > {(deleteTeam, { loading, error, data }) => { let errors let loader if (loading) { +<<<<<<< HEAD loader = Submitting team... +======= + loader = ( + Submitting team... + ) +>>>>>>> feature/client-refactor-react } if (error) { errors = error.graphQLErrors.map(({ message }, i) => { @@ -93,7 +106,16 @@ export class ManageTeamDelete extends Component { } return (
+<<<<<<< HEAD
+<<<<<<< HEAD Delete Team Team DANGER - Deleting your team cannot be undone Are you sure you want to delete this team? +======= + + Delete Team Team + + + + DANGER - Deleting your team cannot be undone + + + Are you sure you want to delete this team? + +>>>>>>> feature/client-refactor-react {loader} {errors} @@ -113,9 +148,23 @@ export class ManageTeamDelete extends Component { +<<<<<<< HEAD @@ -131,6 +180,10 @@ export class ManageTeamDelete extends Component { async handleSubmit (e, deleteTeam, slug, authId) { e.preventDefault() await deleteTeam({ variables: { slug, owner: authId } }) +<<<<<<< HEAD +======= + this.setState({ open: false }) +>>>>>>> feature/client-refactor-react } } diff --git a/client/src/views/dashboard/components/ManageTeamDetails.js b/client/src/views/dashboard/components/ManageTeamDetails.js index 183db0ea8..8d4d7aa61 100644 --- a/client/src/views/dashboard/components/ManageTeamDetails.js +++ b/client/src/views/dashboard/components/ManageTeamDetails.js @@ -38,7 +38,16 @@ export class ManageTeamDetails extends Component { const { name, members, profile, createdAt } = this.props.team return (
+<<<<<<< HEAD
+<<<<<<< HEAD {name} Team Details +======= + + {name} Team Details + +>>>>>>> feature/client-refactor-react +<<<<<<< HEAD Team Admin: { members.map(member => { @@ -78,6 +94,16 @@ export class ManageTeamDetails extends Component { } }) } +======= + Team Admin:  + {members.map(member => { + if (member.role === 'OWNER' || member.role === 'ADMIN') { + if (member.member !== null && member.member.alias !== undefined && member.member.alias !== null) { + return member.member.alias + } + } + })} +>>>>>>> feature/client-refactor-react diff --git a/client/src/views/dashboard/components/ManageTeamEdit.js b/client/src/views/dashboard/components/ManageTeamEdit.js index 7db8b46be..5b5d8c98d 100644 --- a/client/src/views/dashboard/components/ManageTeamEdit.js +++ b/client/src/views/dashboard/components/ManageTeamEdit.js @@ -66,7 +66,13 @@ export class ManageTeamEdit extends Component { let errors let loader if (loading) { +<<<<<<< HEAD loader = Submitting team... +======= + loader = ( + Submitting team... + ) +>>>>>>> feature/client-refactor-react } if (error) { errors = error.graphQLErrors.map(({ message }, i) => { @@ -81,7 +87,16 @@ export class ManageTeamEdit extends Component { } return (
+<<<<<<< HEAD
+<<<<<<< HEAD Edit Team Details +======= + + Edit Team Details + +>>>>>>> feature/client-refactor-react Cancel +<<<<<<< HEAD @@ -171,7 +201,19 @@ export class ManageTeamEdit extends Component { const currentUser = await getItem('user') let authId = JSON.parse(currentUser) authId = authId.authId +<<<<<<< HEAD await updateTeamProfile({ variables: { slug, owner: authId, description: this.state.description, motto: this.state.motto } }) +======= + await updateTeamProfile({ + variables: { + slug, + owner: authId, + description: this.state.description, + motto: this.state.motto + } + }) + this.setState({ description: '', motto: '', open: false }) +>>>>>>> feature/client-refactor-react } } diff --git a/client/src/views/dashboard/components/ManageTeamsList.js b/client/src/views/dashboard/components/ManageTeamsList.js index 5a5349e86..17e47b902 100644 --- a/client/src/views/dashboard/components/ManageTeamsList.js +++ b/client/src/views/dashboard/components/ManageTeamsList.js @@ -66,16 +66,28 @@ export const ManageTeamsList = ({ classes, user = null }) => { ) } else { return ( +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react {({ loading, error, data }) => { console.log('GET_TEAMS_BY_OWNER: ', loading, error, data) let errors = null if (error) { errors = error.graphQLErrors.map(({ message }, i) => { +<<<<<<< HEAD return ( ) +======= + return +>>>>>>> feature/client-refactor-react }) } if (!loading && !error) { @@ -115,7 +127,11 @@ export const ManageTeamsList = ({ classes, user = null }) => { +<<<<<<< HEAD if (errors !== null) () +======= + {errors !== null && } +>>>>>>> feature/client-refactor-react ) diff --git a/client/src/views/dashboard/index.js b/client/src/views/dashboard/index.js index f62ac733a..27a5462c4 100644 --- a/client/src/views/dashboard/index.js +++ b/client/src/views/dashboard/index.js @@ -12,6 +12,10 @@ import { MainDrawerItems, SecondaryDrawerItems } from './components/DrawerLinks' import Overview from './Overview' import ManageTeams from './ManageTeams' +<<<<<<< HEAD +======= +import FinancialBeings from './FinancialBeings' +>>>>>>> feature/client-refactor-react import TeamMembers from './TeamMembers' import Settings from './Settings' @@ -65,6 +69,10 @@ const Dashboard = ({ classes }) => ( +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react diff --git a/client/src/views/footer/index.js b/client/src/views/footer/index.js index ecbd0c594..0043ca32d 100644 --- a/client/src/views/footer/index.js +++ b/client/src/views/footer/index.js @@ -67,12 +67,28 @@ const Footer = ({ classes }) => { +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react Support +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react Documentation diff --git a/client/src/views/home/index.js b/client/src/views/home/index.js index 5d780b5a2..bfa124910 100644 --- a/client/src/views/home/index.js +++ b/client/src/views/home/index.js @@ -47,7 +47,7 @@ const Home = ({ classes }) => ( color='textSecondary' component='h3' > - Welcome to the Advanced Algos Teams Module + Welcome to Advanced Algos Teams
diff --git a/client/src/views/index.js b/client/src/views/index.js index 8ff455e85..95457e1ad 100644 --- a/client/src/views/index.js +++ b/client/src/views/index.js @@ -8,4 +8,18 @@ import Teams from './teams' import { theme, globalStyles } from './theme' +<<<<<<< HEAD export { NavBar, Footer, Callback, Home, About, Dashboard, Teams, theme, globalStyles } +======= +export { + NavBar, + Footer, + Callback, + Home, + About, + Dashboard, + Teams, + theme, + globalStyles +} +>>>>>>> feature/client-refactor-react diff --git a/client/src/views/navbar/index.js b/client/src/views/navbar/index.js index ca33893d2..8f7c1f768 100644 --- a/client/src/views/navbar/index.js +++ b/client/src/views/navbar/index.js @@ -82,7 +82,14 @@ class NavBar extends Component { return (
+<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react Advanced Algos - Teams Module + Teams +<<<<<<< HEAD +======= + + +>>>>>>> feature/client-refactor-react {this.state.user !== undefined && this.state.user !== null ? ( diff --git a/client/src/views/teams/components/TeamsDetails.js b/client/src/views/teams/components/TeamsDetails.js index 5c590a54b..d7c2fb5a7 100644 --- a/client/src/views/teams/components/TeamsDetails.js +++ b/client/src/views/teams/components/TeamsDetails.js @@ -63,10 +63,20 @@ const TeamsDetails = ({ classes, team }) => ( {team.createdAt} +<<<<<<< HEAD +======= + + Motto: {team.profile.motto} + + + Description: {team.profile.description} + +>>>>>>> feature/client-refactor-react Members: {team.members.length} +<<<<<<< HEAD Team Admin: { team.members.map(member => { @@ -75,6 +85,14 @@ const TeamsDetails = ({ classes, team }) => ( } }) } +======= + Team Admin:  + {team.members.map(member => { + if (member.role === 'OWNER' || member.role === 'ADMIN') { + return member.member.alias + } + })} +>>>>>>> feature/client-refactor-react
diff --git a/client/src/views/teams/components/TeamsItem.js b/client/src/views/teams/components/TeamsItem.js index 6b2e20bb1..e32e68e9a 100644 --- a/client/src/views/teams/components/TeamsItem.js +++ b/client/src/views/teams/components/TeamsItem.js @@ -37,7 +37,11 @@ export const TeamsItem = ({ classes, team }) => ( +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react diff --git a/client/src/views/teams/components/TeamsList.js b/client/src/views/teams/components/TeamsList.js index 64493cdff..4a8b7bea5 100644 --- a/client/src/views/teams/components/TeamsList.js +++ b/client/src/views/teams/components/TeamsList.js @@ -39,7 +39,11 @@ const styles = theme => ({ }) export const TeamsList = ({ classes, match }) => ( +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react {({ loading, error, data }) => { console.log('GET_ALL_TEAMS: ', loading, error, data, match) let slug = null @@ -65,10 +69,14 @@ export const TeamsList = ({ classes, match }) => ( data.teams.edges.map(team => { if (team.node.slug === slug) { return ( +<<<<<<< HEAD +======= + +>>>>>>> feature/client-refactor-react ) } })}