Commit e069e0e0 authored by Nikos Marinos's avatar Nikos Marinos
Browse files

changed pdf frequency to 10 minutes

parent bf15b57d
Pipeline #12597 passed with stages
in 5 minutes and 37 seconds
import React from 'react'
import { H1, Link, Button, Icon } from '@pubsweet/ui'
import { Notification, ConfirmDialog, Select } from '../ui'
import { Notification, ConfirmDialog, Select, TextArea } from '../ui'
import UserCore from '../UserCore'
const NO_PRIVILEGE = 'No Privilege'
......@@ -10,6 +10,7 @@ class AccountDetails extends React.Component {
isOpen: false,
teamOptions: [],
team: '',
meta: '',
}
toggleReset = () => {
......@@ -23,6 +24,7 @@ class AccountDetails extends React.Component {
const { values, handleSubmit } = this.props
// handling letter casing in admin user management
if (values.manageAccount) {
this.state.meta = values.meta
this.state.teamOptions = values.teamOptions
this.state.team =
values.team.charAt(0).toUpperCase() + values.team.slice(1)
......@@ -42,6 +44,10 @@ class AccountDetails extends React.Component {
team: values.team,
})
}
const editMeta = e => {
values.meta = e.target.value
this.setState({meta: values.meta })
}
return (
<React.Fragment>
{values.signup && <H1>Create a Europe PMC plus account</H1>}
......@@ -65,6 +71,14 @@ class AccountDetails extends React.Component {
value={this.state.team}
width="400px"
/>
{values.meta && (
<TextArea
label="Metadata"
onChange={editMeta}
value={this.state.meta}
rows={3}
/>
)}
<Button primary type="submit">
Confirm
</Button>
......
......@@ -15,6 +15,7 @@ const handleSubmit = (values, { props, setSubmitting, setValues, setErrors }) =>
givenNames: values.givenNames,
surname: values.surname,
email: values.email,
meta: values.meta,
team: values.team === NO_PRIVILEGE ? null : values.team,
id: values.id,
},
......@@ -97,6 +98,7 @@ const enhancedFormik = withFormik({
resetPassword,
team: props.user.teams[0] ? props.user.teams[0] : NO_PRIVILEGE,
teamOptions,
meta: currentIdentity.meta,
}
},
validationSchema: yup.object().shape({
......
......@@ -12,6 +12,7 @@ const UPDATE_USER = gql`
givenNames
surname
}
meta
}
teams
}
......
......@@ -12,6 +12,7 @@ const GET_USER = gql`
givenNames
surname
}
meta
}
teams
}
......
......@@ -15,6 +15,11 @@ services:
ports:
- "5432:5432"
xsweet:
depends_on:
- postgres
ftpd_server:
volumes:
- "ftpdata:/home/ftpusers/"
......
......@@ -16,6 +16,10 @@ services:
ports:
- "5432:5432"
xsweet:
depends_on:
- app
ftpd_server:
volumes: # remember to replace /folder_on_disk/ with the path to where you want to store the files on the host machine
- "ftpdata:/home/ftpusers/"
......
......@@ -35,8 +35,6 @@ services:
xsweet:
image: pubsweet/job-xsweet:1.1.0
command: sh -c "./scripts/wait-for-it.sh postgres:5432 -s -t 40 -- node src/xsweet.js"
depends_on:
- app
env_file:
- .env.postgres
volumes:
......
......@@ -25,10 +25,10 @@ class User extends EpmcBaseModel {
return {
properties: {
id: { type: ['uuid'] },
defaultIdentity: { type: 'string' },
title: { type: 'string' },
givenNames: { type: 'string' },
surname: { type: 'string' },
defaultIdentity: { type: ['string', 'null'] },
title: { type: ['string', 'null'] },
givenNames: { type: ['string', 'null'] },
surname: { type: ['string', 'null'] },
privacyNoticeVersion: { type: 'string' },
privacyNoticeAgreedDate: { type: 'timestamp' },
deleted: { type: 'timestamp' },
......
......@@ -78,6 +78,7 @@ const UserManager = {
} else {
identity.updateProperties({
email: input.email,
meta: input.meta ? JSON.parse(input.meta) : null,
updatedBy,
})
}
......
......@@ -8,6 +8,7 @@ const userUtil = {
const graphQlUser = dbUser
graphQlUser.identities.forEach(identity => {
identity.name = name
identity.meta = JSON.stringify(identity.meta)
})
if (graphQlUser.teams) {
graphQlUser.teams = graphQlUser.teams
......
......@@ -10,6 +10,7 @@ type epmc_Identity {
type: String!
email: String!
name: Name!
meta: String
}
type epmc_User {
......
......@@ -106,6 +106,7 @@ input UpdateUserInput {
givenNames: String!
surname: String!
team: String
meta: String
}
input UpdateCurrentUserInput {
......
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