diff --git a/app/components/Dashboard/Book.jsx b/app/components/Dashboard/Book.jsx index a48f20bd6bb3cde10b3a9c409acd53c4327bcd91..5ee0de25b1ef2b24b7cf65d594c67382cd9024fa 100644 --- a/app/components/Dashboard/Book.jsx +++ b/app/components/Dashboard/Book.jsx @@ -46,10 +46,11 @@ class Book extends React.Component { const { book, edit } = this.props const patch = { + id: book.id, title: this.renameTitle.value } - edit(book, patch) + edit(patch) this.setState({ isRenaming: false }) diff --git a/app/components/Dashboard/Dashboard.jsx b/app/components/Dashboard/Dashboard.jsx index 8b6bbff8ffdcdeff5003e92ca714c429a9d9d865..2a5bd2f07cde059d228e1b1c25d93393e493d8c3 100644 --- a/app/components/Dashboard/Dashboard.jsx +++ b/app/components/Dashboard/Dashboard.jsx @@ -56,6 +56,7 @@ export class Dashboard extends React.Component { Once you have the new book's db id, make the teams for it as well. */ createBook (newTitle) { + console.log('called') const { createCollection } = this.props.actions const book = { @@ -71,9 +72,9 @@ export class Dashboard extends React.Component { /* Edit a book's properties. */ - editBook (book, patch) { - const { patchCollection } = this.props.actions - patchCollection(book, patch) + editBook (patch) { + const { updateCollection } = this.props.actions + updateCollection(patch) } /* diff --git a/package.json b/package.json index d22ddad3028c54c63d98e955ebcd138e5a3c7c50..ec4a1777a3815cd1184297e9011ea5eab347c25e 100644 --- a/package.json +++ b/package.json @@ -20,18 +20,18 @@ "html-webpack-plugin": "^2.24.0", "json-loader": "^0.5.4", "lodash": "^4.17.4", - "pubsweet-client": "0.8.4", - "pubsweet-component-blog": "0.1.2", - "pubsweet-component-ink-backend": "0.0.4", + "pubsweet-client": "0.9.0", + "pubsweet-component-blog": "0.1.3", + "pubsweet-component-ink-backend": "0.0.5", "pubsweet-component-ink-frontend": "0.0.2", "pubsweet-component-login": "0.2.2", - "pubsweet-component-manage": "0.1.2", - "pubsweet-component-navigation": "0.1.1", + "pubsweet-component-manage": "0.1.3", + "pubsweet-component-navigation": "0.2.0", "pubsweet-component-signup": "0.1.1", "pubsweet-component-teams-manager": "0.1.2", "pubsweet-component-theme-editoria": "git+https://gitlab.coko.foundation/yannisbarlas/pubsweet-component-theme-editoria.git", "pubsweet-component-users-manager": "0.1.1", - "pubsweet-server": "0.7.3", + "pubsweet-server": "0.8.0", "pubsweet-theme-plugin": "0.0.1", "react-dnd": "^2.1.4", "react-dnd-html5-backend": "^2.1.2",