Fixed a bug where toggling between choosing and adding a new publisher would not work
the build failed
Details
the build failed
Details
This commit is contained in:
parent
19932ca7e4
commit
f93fc3aa84
|
@ -48,7 +48,7 @@
|
|||
<div class="field" v-if="addPublisherForm">
|
||||
<label v-lang.publishers.newPublisher></label>
|
||||
<a class="ui green icon button add-publisher-btn" @click="toggleAddPublisher()"><i class="list icon"></i></a>
|
||||
<input name="name" :placeholder="langPublishers.newPublisher" type="text" v-model="book.Publisher.name" class="add-publisher">
|
||||
<input name="name" :placeholder="langPublishers.newPublisher" type="text" v-model="book.publisher.name" class="add-publisher">
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
|
@ -164,7 +164,6 @@
|
|||
if (this.book.authors === null) {
|
||||
this.book.authors = []
|
||||
}
|
||||
console.log(this.book.authors)
|
||||
})
|
||||
.catch(e => {
|
||||
this.errorNotification(e)
|
||||
|
@ -248,15 +247,12 @@
|
|||
// Add all newly created authors to it
|
||||
let as = this.newAuthors
|
||||
|
||||
console.log(this.book, this.newAuthors)
|
||||
|
||||
for (const i in as) {
|
||||
this.book.authors.push({
|
||||
id: 0,
|
||||
name: as[i]
|
||||
})
|
||||
}
|
||||
console.log(this.book.authors, this.newAuthors)
|
||||
|
||||
// Beautify all Authors aka split the names in forename and lastname
|
||||
for (const i in this.book.authors) {
|
||||
|
|
Loading…
Reference in New Issue