Skip to content

Commit

Permalink
Merge pull request #106 from ConductionNL/feature/DIMOC-336/more-admi…
Browse files Browse the repository at this point in the history
…n-config

feature/DIMOC-336/more-admin-config
  • Loading branch information
remko48 authored Oct 17, 2024
2 parents 2fa760b + 4e24dd0 commit da3569b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/dialogs/attachment/DepublishAttachmentDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { publicationStore, navigationStore } from '../../store/store.js'
name="Bijlage depubliceren"
:can-close="false">
<p v-if="!succes">
Wil je <b>{{ publicationStore.attachmentItem.name ?? publicationStore.attachmentItem.title }}</b> depubliceren?
Wil je <b>{{ publicationStore.attachmentItem?.name ?? publicationStore.attachmentItem?.title }}</b> depubliceren?
</p>
<NcNoteCard v-if="succes" type="success">
<p>Bijlage succesvol gedepubliceerd</p>
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 @@ -8,7 +8,7 @@ import { publicationStore, navigationStore } from '../../store/store.js'
name="Bijlage publiceren"
:can-close="false">
<p v-if="!succes">
Wil je <b>{{ publicationStore.attachmentItem.name ?? publicationStore.attachmentItem.title }}</b> publiceren?
Wil je <b>{{ publicationStore.attachmentItem?.name ?? publicationStore.attachmentItem?.title }}</b> publiceren?
</p>
<NcNoteCard v-if="succes" type="success">
<p>Bijlage succesvol gepubliceerd</p>
Expand Down
20 changes: 17 additions & 3 deletions src/dialogs/publication/DownloadPublicationDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import { navigationStore, publicationStore } from '../../store/store.js'
:can-close="false">
<div v-if="success !== null || error">
<NcNoteCard v-if="success" type="success">
<p>Publicatie succesvol gearchiveerd</p>
<p>Publicatie succesvol gedownload</p>
</NcNoteCard>
<NcNoteCard v-if="!success" type="error">
<p>Er is iets fout gegaan bij het archiveren van Publicatie</p>
<p>Er is iets fout gegaan bij het downloaden van de publicatie</p>
</NcNoteCard>
<NcNoteCard v-if="error" type="error">
<p>{{ error }}</p>
Expand All @@ -24,7 +24,7 @@ import { navigationStore, publicationStore } from '../../store/store.js'
<div class="downloadButtonGroup">
<NcButton
v-if="success === null"
:disabled="zipLoading || pdfLoading || true"
:disabled="zipLoading || pdfLoading"
icon="Delete"
type="primary"
@click="downloadPublication('zip')">
Expand Down Expand Up @@ -77,12 +77,20 @@ export default {
return {
success: null,
error: false,
pdfLoading: false,
zipLoading: false,
}
},
methods: {
downloadPublication(type) {
this.error = false
if (type === 'pdf') {
this.pdfLoading = true
} else if (type === 'zip') {
this.zipLoading = true
}
publicationStore.downloadPublication(
publicationStore.publicationItem.id,
publicationStore.publicationItem.title,
Expand All @@ -92,6 +100,12 @@ export default {
download()
this.success = response.ok
if (type === 'pdf') {
this.pdfLoading = false
} else if (type === 'zip') {
this.zipLoading = false
}
const self = this
setTimeout(function() {
self.success = null
Expand Down
3 changes: 2 additions & 1 deletion src/modals/theme/EditThemeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,9 @@ export default {
themeStore.editTheme(themeItem)
.then((response) => {
this.loading = false
this.success = response.ok
this.success = response.response.ok
// Wait for the user to read the feedback then close the model
const self = this
Expand Down
6 changes: 3 additions & 3 deletions src/views/themes/ThemeDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ import { navigationStore, themeStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton @click="navigationStore.setModal('editTheme')">
<NcActionButton @click="themeStore.setThemeItem(theme); navigationStore.setModal('editTheme')">
<template #icon>
<Pencil :size="20" />
</template>
Bewerken
</NcActionButton>
<NcActionButton @click="navigationStore.setDialog('copyTheme')">
<NcActionButton @click="themeStore.setThemeItem(theme); navigationStore.setDialog('copyTheme')">
<template #icon>
<ContentCopy :size="20" />
</template>
Kopiëren
</NcActionButton>
<NcActionButton @click="navigationStore.setDialog('deleteTheme')">
<NcActionButton @click="themeStore.setThemeItem(theme); navigationStore.setDialog('deleteTheme')">
<template #icon>
<Delete :size="20" />
</template>
Expand Down

0 comments on commit da3569b

Please sign in to comment.