Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
remko48 committed Aug 13, 2024
1 parent f47fc42 commit c036563
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion src/modals/attachment/AddAttachmentModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default {
},
props: {
dropFiles: {
type: Object,
type: Array,
required: false,
default: null,
},
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/publication.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const usePublicationStore = defineStore(
},
setAttachmentFile(files) {
this.attachmentFile = files
console.log('Files' + files)
console.log('Active attachment files set to ' + files)
},
},
setPublicationList(publicationList) {
Expand Down
146 changes: 73 additions & 73 deletions src/views/publications/PublicationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,84 +207,83 @@ import { ref } from 'vue'
Geen eigenschappen gevonden
</div>
</BTab>
<BTab title="Bijlagen">
<BTab title="Bijlagen">
<div ref="dropZoneRef">
<div v-if="isOverDropZone">
<div class="filesListDragDropNotice">
<div class="filesListDragDropNoticeWrapper">
<TrayArrowDown :size="48" />
<h3 class="filesListDragDropNoticeTitle">
Drag and drop files here to upload
</h3>
</div>
<div v-if="isOverDropZone">
<div class="filesListDragDropNotice">
<div class="filesListDragDropNoticeWrapper">
<TrayArrowDown :size="48" />
<h3 class="filesListDragDropNoticeTitle">
Drag and drop files here to upload
</h3>
</div>
</div>
<div
v-if="publicationStore.publicationAttachments.length > 0 && !isOverDropZone"
class="tabPanel">
<NcListItem v-for="(attachment, i) in publicationStore.publicationAttachments"
:key="`${attachment}${i}`"
:name="attachment.name ?? attachment.title"
:bold="false"
:active="publicationStore.attachmentId === attachment.id"
:force-display-actions="true"
:details="(attachment?.published && attachment?.published <= now.toISOString()) ? 'Gepubliseerd' : 'Niet gepubliseerd'">
<template #icon>
<CheckCircle v-if="attachment?.published && attachment?.published <= now.toISOString()"
:class="attachment?.published <= now.toISOString() && 'publishedIcon'"
disable-menu
:size="44" />
<ExclamationThick v-if="!attachment?.published || attachment?.published > now.toISOString()"
:class="!attachment?.published && 'warningIcon' || attachment?.published > now.toISOString() && 'warningIcon'"
disable-menu
:size="44" />
</template>
<template #subname>
{{ attachment?.description }}
</template>
<template #actions>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setModal('EditAttachment')">
<template #icon>
<Pencil :size="20" />
</template>
Bewerken
</NcActionButton>
<NcActionButton @click="openLink(attachment?.downloadUrl, '_blank')">
<template #icon>
<Download :size="20" />
</template>
Download
</NcActionButton>
<NcActionButton v-if="!attachment?.published || attachment?.published > now.toISOString()" @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('publishAttachment')">
<template #icon>
<Publish :size="20" />
</template>
Publiceren
</NcActionButton>
<NcActionButton v-if="attachment?.published && attachment?.published <= now.toISOString()" @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('depublishAttachment')">
<template #icon>
<PublishOff :size="20" />
</template>
Depubliceren
</NcActionButton>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('copyAttachment')">
<template #icon>
<ContentCopy :size="20" />
</template>
Kopiëren
</NcActionButton>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('deleteAttachment')">
<template #icon>
<Delete :size="20" />
</template>
Verwijderen
</NcActionButton>
</template>
</NcListItem>
</div>
</div>
<div
v-if="publicationStore.publicationAttachments.length > 0 && !isOverDropZone"
class="tabPanel">
<NcListItem v-for="(attachment, i) in publicationStore.publicationAttachments"
:key="`${attachment}${i}`"
:name="attachment.name ?? attachment.title"
:bold="false"
:active="publicationStore.attachmentId === attachment.id"
:force-display-actions="true"
:details="(attachment?.published && attachment?.published <= now.toISOString()) ? 'Gepubliseerd' : 'Niet gepubliseerd'">
<template #icon>
<CheckCircle v-if="attachment?.published && attachment?.published <= now.toISOString()"
:class="attachment?.published <= now.toISOString() && 'publishedIcon'"
disable-menu
:size="44" />
<ExclamationThick v-if="!attachment?.published || attachment?.published > now.toISOString()"
:class="!attachment?.published && 'warningIcon' || attachment?.published > now.toISOString() && 'warningIcon'"
disable-menu
:size="44" />
</template>
<template #subname>
{{ attachment?.description }}
</template>
<template #actions>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setModal('EditAttachment')">
<template #icon>
<Pencil :size="20" />
</template>
Bewerken
</NcActionButton>
<NcActionButton @click="openLink(attachment?.downloadUrl, '_blank')">
<template #icon>
<Download :size="20" />
</template>
Download
</NcActionButton>
<NcActionButton v-if="!attachment?.published || attachment?.published > now.toISOString()" @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('publishAttachment')">
<template #icon>
<Publish :size="20" />
</template>
Publiceren
</NcActionButton>
<NcActionButton v-if="attachment?.published && attachment?.published <= now.toISOString()" @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('depublishAttachment')">
<template #icon>
<PublishOff :size="20" />
</template>
Depubliceren
</NcActionButton>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('copyAttachment')">
<template #icon>
<ContentCopy :size="20" />
</template>
Kopiëren
</NcActionButton>
<NcActionButton @click="publicationStore.setAttachmentItem(attachment); navigationStore.setDialog('deleteAttachment')">
<template #icon>
<Delete :size="20" />
</template>
Verwijderen
</NcActionButton>
</template>
</NcListItem>
</div>

<div v-if="publicationStore.publicationAttachments.length === 0" class="tabPanel">
<div v-if="publicationStore.publicationAttachments.length === 0 && !isOverDropZone" class="tabPanel">
Geen bijlagen gevonden
</div>
<div v-if="publicationStore.publicationAttachments.length !== 0 && !publicationStore.publicationAttachments.length > 0" class="tabPanel">
Expand All @@ -294,6 +293,7 @@ import { ref } from 'vue'
appearance="dark"
name="Bijlagen aan het laden" />
</div>
</div>
</BTab>
<BTab title="Logging">
<table width="100%">
Expand Down

0 comments on commit c036563

Please sign in to comment.