Commit cab14728 authored by Alexandros Georgantas's avatar Alexandros Georgantas

global teams enabled for UCP

parent 0f5bf093
......@@ -3,7 +3,7 @@ import { Redirect, Route, Switch } from 'react-router-dom'
// Users and Teams
import UsersManager from 'pubsweet-component-users-manager/UsersManagerContainer'
import GlobalTeamsManager from 'pubsweet-component-booksprints-globalteams/src/GlobalTeamsManager'
import GlobalTeamsManager from 'pubsweet-component-editoria-global-teams/src/GlobalTeamsManager'
// import TeamsManager from 'pubsweet-component-teams-manager/TeamsManagerContainer'
// Authentication
......
......@@ -26,4 +26,7 @@ module.exports = {
title: Joi.string().allow(null),
trackChanges: Joi.boolean(),
},
team: {
global: Joi.boolean().allow(null),
},
}
......@@ -28,31 +28,20 @@ const seed = async () => {
try {
const teams = await Team.findByField({ global: true })
const editorsTeam = teams.find(t => t.teamType === 'productionEditor')
const scienceOfficersTeam = teams.find(t => t.teamType === 'author')
const productionEditorTeam = teams.find(
t => t.teamType === 'productionEditor',
)
if (editorsTeam && scienceOfficersTeam) {
if (productionEditorTeam) {
logger.info('All global teams found, exiting...')
} else {
if (!editorsTeam) {
logger.warn('No Production Editor team found')
await makeTeam('productionEditor')
} else {
logger.info('Production Editor team already exists')
}
if (!scienceOfficersTeam) {
logger.warn('No Author team found')
await makeTeam('author')
} else {
logger.info('Author team already exists')
}
logger.warn('No Production Editor team found')
await makeTeam('productionEditor')
}
} catch (err) {
logger.warn('No global teams found')
await makeTeam('productionEditor')
await makeTeam('author')
}
logger.info('Team seed successfully finished')
......
......@@ -5404,6 +5404,17 @@ formatio@1.1.1:
dependencies:
samsam "~1.1"
formik@^0.11.11:
version "0.11.11"
resolved "https://registry.yarnpkg.com/formik/-/formik-0.11.11.tgz#4b02838133c0196b1ef443aa973766cd097ec4a5"
integrity sha1-SwKDgTPAGWse9EOqlzdmzQl+xKU=
dependencies:
lodash.clonedeep "^4.5.0"
lodash.isequal "4.5.0"
lodash.topath "4.5.2"
prop-types "^15.5.10"
warning "^3.0.0"
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
......@@ -7793,7 +7804,7 @@ lodash.clonedeep@^3.0.0:
lodash._baseclone "^3.0.0"
lodash._bindcallback "^3.0.0"
lodash.clonedeep@^4.3.2:
lodash.clonedeep@^4.3.2, lodash.clonedeep@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
......@@ -7853,7 +7864,7 @@ lodash.isarray@^3.0.0:
resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
integrity sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=
lodash.isequal@^4.5.0:
lodash.isequal@4.5.0, lodash.isequal@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
......@@ -7947,6 +7958,11 @@ lodash.toarray@^4.4.0:
resolved "https://registry.yarnpkg.com/lodash.toarray/-/lodash.toarray-4.4.0.tgz#24c4bfcd6b2fba38bfd0594db1179d8e9b656561"
integrity sha1-JMS/zWsvuji/0FlNsRedjptlZWE=
lodash.topath@4.5.2:
version "4.5.2"
resolved "https://registry.yarnpkg.com/lodash.topath/-/lodash.topath-4.5.2.tgz#3616351f3bba61994a0931989660bd03254fd009"
integrity sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=
lodash.uniq@^4.5.0:
version "4.5.0"
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
......@@ -10239,7 +10255,7 @@ prompt@^1.0.0:
utile "0.3.x"
winston "2.1.x"
"prompt@github:flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87":
prompt@flatiron/prompt#1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87:
version "1.0.0"
resolved "https://codeload.github.com/flatiron/prompt/tar.gz/1c95d1d8d333b5fbc13fa5f0619f3dcf0d514f87"
dependencies:
......@@ -10393,6 +10409,26 @@ pubsweet-component-editoria-dashboard@^0.1.1:
react-router-dom "4.2.2"
redux "3.6.0"
pubsweet-component-editoria-global-teams@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pubsweet-component-editoria-global-teams/-/pubsweet-component-editoria-global-teams-0.1.1.tgz#215beba7b1b175e3c367091d17805f2efb63a570"
integrity sha512-CaXIfPtbHVNDMgDJjXbPbl7cuWwgFCF9POf1k7YBDsbTh+ct2VcJDYLu5c1fwZjW/3xdmBpWMWZYC1smGCD54w==
dependencies:
classnames "^2.2.5"
config "^1.27.0"
editoria-common "^0.1.1"
font-awesome "4.7.0"
formik "^0.11.11"
lodash "4.17.4"
pubsweet-client "^2.5.5"
react "^16.2.0"
react-dom "^16.2.0"
react-redux "5.0.4"
react-router-dom "4.2.2"
react-select "^2.1.1"
redux "3.7.2"
styled-components "^3.3.0"
pubsweet-component-epub-frontend@^0.1.3:
version "0.1.6"
resolved "https://registry.yarnpkg.com/pubsweet-component-epub-frontend/-/pubsweet-component-epub-frontend-0.1.6.tgz#31e8a48312bf29c80230c22b047591ff4cf67009"
......@@ -11083,7 +11119,7 @@ react-router@^4.2.0, react-router@^4.3.1:
prop-types "^15.6.1"
warning "^4.0.1"
react-select@^2.0.0:
react-select@^2.0.0, react-select@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/react-select/-/react-select-2.1.1.tgz#762d0babd8c7c46a944db51cbb72e4ee117253f9"
integrity sha512-ukie2LJStNfJEJ7wtqA+crAfzYpkpPr86urvmJGisECwsWJob9boCM4zjmKCi5QR7G8uY9+v7ZoliJpeCz/4xw==
......@@ -12600,7 +12636,7 @@ style-search@^0.1.0:
resolved "https://registry.yarnpkg.com/style-search/-/style-search-0.1.0.tgz#7958c793e47e32e07d2b5cafe5c0bf8e12e77902"
integrity sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=
styled-components@^3.2.5:
styled-components@^3.2.5, styled-components@^3.3.0:
version "3.4.10"
resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-3.4.10.tgz#9a654c50ea2b516c36ade57ddcfa296bf85c96e1"
integrity sha512-TA8ip8LoILgmSAFd3r326pKtXytUUGu5YWuqZcOQVwVVwB6XqUMn4MHW2IuYJ/HAD81jLrdQed8YWfLSG1LX4Q==
......
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