Commit c2c7224c authored by Alexandros Georgantas's avatar Alexandros Georgantas

configurable book builder and authsome update

parent 799fc94a
......@@ -2,6 +2,7 @@ import { flow } from 'lodash'
import React from 'react'
import PropTypes from 'prop-types'
import { DragSource, DropTarget } from 'react-dnd'
import config from 'config'
import Authorize from 'pubsweet-client/src/helpers/Authorize'
import FirstRow from './Chapter/FirstRow'
import SecondRow from './Chapter/SecondRow'
......@@ -32,9 +33,15 @@ class Chapter extends React.PureComponent {
const { book, update, chapter } = this.props
// SHOULD BE REMOVED. This automaticaly sets track changes on for the case
// or review in progress
if (patch.progress) {
if (patch.progress.review === 0 && chapter.trackChanges === false) {
patch.trackChanges = true
if (
config.bookBuilder &&
config.bookBuilder.instance &&
config.bookBuilder.instance === 'UCP'
) {
if (patch.progress) {
if (patch.progress.review === 0 && chapter.trackChanges === false) {
patch.trackChanges = true
}
}
}
update(book, patch)
......
import { get, includes } from 'lodash'
import { get } from 'lodash'
import React from 'react'
import PropTypes from 'prop-types'
import withLink from 'editoria-common/src/withLink'
......
module.exports = {
instace: 'UCP',
chapter: {
dropdownValues: {
back: ['Appendix A', 'Appendix B', 'Appendix C'],
......
......@@ -812,6 +812,10 @@ module.exports = {
const mode = new EditoriaMode(userId, operation, object, context)
return mode.canFragmentEdit()
},
'can view stateList': (userId, operation, object, context) => {
const mode = new EditoriaMode(userId, operation, object, context)
return mode.canInteractWithFragments()
},
'can reorder bookComponents': (userId, operation, object, context) => {
const mode = new EditoriaMode(userId, operation, object, context)
return mode.canInteractWithFragments()
......
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