added note picto to medium Card responding to note creation on modalCard

This commit is contained in:
2021-03-10 14:54:58 +01:00
parent fbf509a005
commit e0f8b123f9
5 changed files with 38 additions and 10 deletions

View File

@@ -285,7 +285,7 @@ const _debounce = require('lodash/debounce')
export default {
name: "ModalCard",
props: ['item'],
props: ['item', 'addNoteId'],
mixins: [cardMixins],
components: {
LinkedMaterialCard
@@ -335,7 +335,7 @@ export default {
},
methods: {
...mapActions({
refreshItem: 'Search/refreshItem',
// refreshItem: 'Search/refreshItem',
createFlagColl: 'User/createFlagColl',
flagUnflag: 'User/flagUnflag'
}),
@@ -467,8 +467,11 @@ export default {
console.log('createNote REST data', data)
this.note_nid = data.nid[0].value
// call search results refresh of the item to display that note is now existing for this item
// TODO: do the same for article linked materials
this.refreshItem({id: this.item.id})
// this.refreshItem({id: this.item.id})
// no needs to refresh the entire item via searchresults
// plus if we are in article, there is not searchresults
// instead call the callbackfunction from teh parent to add directly the note id
this.addNoteId(this.note_nid)
})
.catch(error => {
console.warn('Issue with createNote', error)