Skip to content

Commit

Permalink
Make sure to pass along id to getPublicationAttachments
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Aug 14, 2024
1 parent 419a572 commit 1261425
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/dialogs/attachment/CopyAttachmentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export default {
this.succes = true
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
}
// Wait for the user to read the feedback then close the model
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/attachment/DeleteAttachmentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default {
this.succes = true
// Lets refresh the attachment list
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
this.filterdAttachments = publicationStore.publicationItem.attachments.filter((attachment) => { return parseInt(attachment) !== parseInt(publicationStore.attachmentItem.id) })
fetch(
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/attachment/DepublishAttachmentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default {
this.succes = true
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
}
// Wait for the user to read the feedback then close the model
Expand Down
2 changes: 1 addition & 1 deletion src/dialogs/attachment/PublishAttachmentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default {
this.succes = true
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
}
// Wait for the user to read the feedback then close the model
Expand Down
2 changes: 1 addition & 1 deletion src/modals/attachment/AddAttachmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export default {
reset()
// Lets refresh the attachment list
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
fetch(
`/index.php/apps/opencatalogi/api/publications/${publicationStore.publicationItem.id}`,
Expand Down
2 changes: 1 addition & 1 deletion src/modals/attachment/EditAttachmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default {
this.success = response.ok
// Lets refresh the catalogiList
if (publicationStore.publicationItem) {
publicationStore.getPublicationAttachments(publicationStore.publicationItem)
publicationStore.getPublicationAttachments(publicationStore.publicationItem?.id)
}
response.json().then((data) => {
publicationStore.setAttachmentItem(data)
Expand Down

0 comments on commit 1261425

Please sign in to comment.