Commit e2d55bca authored by Alexandros Georgantas's avatar Alexandros Georgantas

ready

parent ad73b1e4
{
"name": "pubsweet-component-bookbuilder-booksprints",
"version": "1.0.1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
......@@ -18,7 +18,7 @@
"axios": "^0.17.1",
"classnames": "^2.2.5",
"config": "^1.27.0",
"editoria-common": "^0.1.2",
"editoria-common": "^0.1.1",
"font-awesome": "4.7.0",
"lodash": "4.17.4",
"pubsweet-client": "^2.5.5",
......
{
"name": "editoria-common",
"version": "0.1.2",
"version": "0.1.1",
"description": "Common react components for the editoria project",
"main": "index.js",
"scripts": {
......
{
"name": "pubsweet-component-editoria-dashboard-booksprints",
"version": "1.0.1",
"version": "1.0.0",
"description": "The application dashboard for the Editoria project.",
"main": "index.js",
"scripts": {
......@@ -17,7 +17,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"editoria-common": "^0.1.2",
"editoria-common": "^0.1.1",
"lodash": "4.17.4",
"pubsweet-client": "^2.5.0",
"react": "^16.2.0",
......
......@@ -16,8 +16,8 @@ import Wax from 'pubsweet-component-wax/src/WaxPubsweet'
import WithConfig from 'pubsweet-component-wax/src/WithConfig'
// Editoria
import BookBuilder from 'pubsweet-component-bookbuilder/src/BookBuilder'
import Dashboard from 'pubsweet-component-editoria-dashboard/src/Dashboard'
import BookBuilder from 'pubsweet-component-bookbuilder-booksprints/src/BookBuilder'
import Dashboard from 'pubsweet-component-editoria-dashboard-booksprints/src/Dashboard'
import Manage from 'pubsweet-component-manage/Manage'
import Navigation from './components/Navigation/Navigation'
import PrivateRoute from './components/PrivateRoute'
......
{
"name": "Editoria Book Sprints",
"name": "Editoria_BookSprints",
"description": "An application for managing book production flows",
"private": true,
"keywords": [
......@@ -17,7 +17,7 @@
},
"homepage": "https://editoria.pub/",
"license": "MIT",
"version": "1.3.3",
"version": "1.3.2",
"dependencies": {
"@pubsweet/component-polling-client": "^0.0.3",
"@pubsweet/component-polling-server": "^0.0.7",
......@@ -32,9 +32,9 @@
"prop-types": "^15.6.0",
"pubsweet": "^2.2.8",
"pubsweet-client": "^2.5.5",
"pubsweet-component-bookbuilder-booksprints": "^1.0.1",
"pubsweet-component-booksprints-globalteams": "^0.1.1",
"pubsweet-component-editoria-dashboard-booksprints": "^1.0.1",
"pubsweet-component-bookbuilder-booksprints": "^1.0.0",
"pubsweet-component-booksprints-globalteams": "^0.1.0",
"pubsweet-component-editoria-dashboard-booksprints": "^1.0.0",
"pubsweet-component-epub": "^0.3.1",
"pubsweet-component-epub-frontend": "^0.1.3",
"pubsweet-component-ink-backend": "^0.1.1",
......@@ -46,11 +46,11 @@
"pubsweet-component-password-reset-frontend": "1.0.0",
"pubsweet-component-signup": "^0.4.1",
"pubsweet-component-teams-manager": "1.0.0",
"pubsweet-component-theme-editoria": "^0.0.5",
"pubsweet-component-theme-editoria": "^0.0.4",
"pubsweet-component-users-manager": "1.0.0",
"pubsweet-component-vivliostyle-viewer": "^1.0.1",
"pubsweet-component-vivliostyle-viewer": "^1.0.0",
"pubsweet-component-wax": "^0.6.10",
"pubsweet-editoria-booksprints-authsome": "^1.0.1",
"pubsweet-editoria-booksprints-authsome": "^1.0.0",
"pubsweet-server": "^7.2.0",
"pubsweet-theme-plugin": "^0.0.3",
"react": "^16.2.0",
......
{
"name": "pubsweet-editoria-booksprints-authsome",
"version": "1.0.1",
"version": "1.0.0",
"description": "Authsome mode for Editoria Book Sprints",
"main": "src/index.js",
"scripts": {
......@@ -18,7 +18,7 @@
"license": "MIT",
"devDependencies": {
"jest": "^22.2.0",
"jest-environment-db": "^1.0.2",
"jest-environment-db": "^1.0.1",
"jsdoc": "^3.5.5",
"jsdoc-to-markdown": "^4.0.1",
"pubsweet-server": "^7.1.0",
......
{
"name": "pubsweet-component-booksprints-globalteams",
"version": "0.1.1",
"version": "0.1.0",
"description": "",
"main": "index.js",
"scripts": {
......@@ -15,7 +15,7 @@
"dependencies": {
"classnames": "^2.2.5",
"config": "^1.27.0",
"editoria-common": "^0.1.2",
"editoria-common": "^0.1.1",
"font-awesome": "4.7.0",
"formik": "^0.11.11",
"lodash": "4.17.4",
......
......@@ -174,7 +174,7 @@ class GlobalTeamsManager extends Component {
return item.value
}),
}))
console.log('data', data)
const promises = data.map(team => updateTeam(team))
Promise.all(promises).then(res => {
......
import React, { Component } from 'react'
import Select from 'react-select'
import { sortBy, key } from 'lodash'
// import PropTypes from 'prop-types'
import { bindActionCreators } from 'redux'
// import Authorize from 'pubsweet-client/src/helpers/Authorize'
import { connect } from 'react-redux'
// TODO -- clean up this import
import Actions from 'pubsweet-client/src/actions'
// const options = [
// { value: 'chocolate', label: 'Chocolate' },
// { value: 'strawberry', label: 'Strawberry' },
// { value: 'vanilla', label: 'Vanilla' },
// ]
const TeamHeading = props => {
const { name, type } = props
return <label htmlFor={type}>{name}</label>
}
const TeamSection = props => {
const { name, setFieldValue, type, users, value } = props
// console.log(props)
const options = users
? users.map(user => ({
label: user.username,
value: user.id,
}))
: []
const selectValue = value.map(user => {
if (!user.label && !user.value)
return {
label: user.username,
value: user.id,
}
return user
})
const handleChange = newValue => {
// console.log('here: new val', newValue)
// setFieldValue(type, newValue)
}
return (
<div>
<TeamHeading name={name} type={type} />
<Select
id={type}
isMulti
onChange={this.handleChange}
options={options}
value={selectValue}
/>
</div>
)
}
const TeamManagerForm = props => {
const { setFieldValue, teams, users, values } = props
// console.log(props)
const handleUpdate = (e) => {
e.preventDefault()
console.log(e)
}
return (
<form>
{teams.map(team => (
<TeamSection
key={team.id}
name={team.name}
setFieldValue={setFieldValue}
type={team.teamType}
users={users}
value={values[team.teamType]}
/>
))}
<button onSubmit={handleUpdate} type="submit">
Save
</button>
</form>
)
}
class GlobalTeamsManager extends Component {
state = {
selectedOption: null,
ready: false,
}
componentWillMount() {
const { getUsers, getTeams } = this.props.actions
Promise.all([getUsers(), getTeams()]).then(values => {
this.setState({ ready: true })
})
}
componentDidMount() {}
handleChange = selectedOption => {
this.setState({ selectedOption })
console.log(`Option selected:`, selectedOption)
}
render() {
const { selectedOption, ready } = this.state
console.log('props', this.props)
const { users, teams } = this.props
// let options
if (!ready) return null
const infoMessage = 'Your teams have been successfully updated'
const initialValues = {}
let globalTeams = teams.filter(team => team.global)
globalTeams.forEach(team => {
initialValues[team.teamType] = team.members
})
globalTeams = sortBy(globalTeams, 'name')
return (
<div>
<h1>Global Teams</h1>
<TeamManagerForm teams={globalTeams} users={users} values={initialValues} />
</div>
)
}
}
GlobalTeamsManager.defaultProps = {
teams: null,
users: null,
}
function mapStateToProps(state, { match }) {
const { users, teams } = state
return {
users: users.users,
teams,
}
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators(Actions, dispatch),
}
}
export default connect(
mapStateToProps,
mapDispatchToProps,
)(GlobalTeamsManager)
{
"name": "jest-environment-db",
"version": "1.0.2",
"version": "1.0.1",
"description": "",
"main": "index.js",
"private": true,
......
......@@ -9,6 +9,6 @@
"maintainers": [],
"name": "pubsweet-component-theme-editoria",
"readme": "ERROR: No README data found!",
"version": "0.0.5",
"version": "0.0.4",
"repository": "https://gitlab.coko.foundation/editoria/editoria-theme"
}
{
"name": "pubsweet-component-vivliostyle-viewer",
"version": "1.0.1",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
......
......@@ -11056,9 +11056,9 @@ pubsweet-component-users-manager@1.0.0:
react-redux "^5.0.6"
redux "^3.7.2"
pubsweet-component-wax@^0.6.7:
version "0.6.7"
resolved "https://registry.yarnpkg.com/pubsweet-component-wax/-/pubsweet-component-wax-0.6.7.tgz#8b7348343324d4d8a69905cec9f5e0a9b14d7a32"
pubsweet-component-wax@^0.6.10:
version "0.6.10"
resolved "https://registry.yarnpkg.com/pubsweet-component-wax/-/pubsweet-component-wax-0.6.10.tgz#58328c670692f83ccd25890eb18f125486c066b9"
dependencies:
lodash "4.17.4"
pubsweet-client "^2.5.5"
......@@ -11066,13 +11066,7 @@ pubsweet-component-wax@^0.6.7:
react-dom "^16.2.0"
react-redux "5.0.4"
redux "3.6.0"
wax-editor-react "^0.2.5"
pubsweet-editoria-authsome@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/pubsweet-editoria-authsome/-/pubsweet-editoria-authsome-1.0.1.tgz#3b65574772809833873bbb6a15698b36c3ce415e"
dependencies:
authsome "^0.1.0"
wax-editor-react "^0.2.6"
pubsweet-server@^7.1.0, pubsweet-server@^7.2.0:
version "7.2.0"
......@@ -14767,24 +14761,24 @@ watchpack@^1.3.1, watchpack@^1.4.0:
graceful-fs "^4.1.2"
neo-async "^2.5.0"
wax-editor-core@^0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/wax-editor-core/-/wax-editor-core-0.6.4.tgz#21ab96dbc2b5ce5e54d6fa27826f541f28883a0e"
wax-editor-core@^0.6.5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/wax-editor-core/-/wax-editor-core-0.6.5.tgz#fae9e39840d2a84da7f4f694317b642e7905a461"
dependencies:
codemirror "^5.38.0"
font-awesome "^4.7.0"
lodash "^4.17.4"
substance "1.0.0-beta.6.5"
wax-editor-react@^0.2.5:
version "0.2.5"
resolved "https://registry.yarnpkg.com/wax-editor-react/-/wax-editor-react-0.2.5.tgz#c622c0558932c9dee2a94973f66752242d8b97d4"
wax-editor-react@^0.2.6:
version "0.2.6"
resolved "https://registry.yarnpkg.com/wax-editor-react/-/wax-editor-react-0.2.6.tgz#c499427e447d24ad29e9fbd78e2b1f35558cf2b3"
dependencies:
lodash "^4.17.4"
react "^16.2.0"
react-dom "^16.2.0"
react-router-dom "^4.2.2"
wax-editor-core "^0.6.4"
wax-editor-core "^0.6.5"
wbuf@^1.1.0, wbuf@^1.7.2:
version "1.7.3"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment