Skip to content

Commit

Permalink
Merge pull request #123 from ConductionNL/feature/DIMOC-232/refresh-p…
Browse files Browse the repository at this point in the history
…aram

feature/DIMOC-232/refresh-param
  • Loading branch information
remko48 authored Aug 8, 2024
2 parents 4eac87d + a09616e commit ebf9cb8
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 47 deletions.
3 changes: 1 addition & 2 deletions src/views/Views.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { navigationStore, searchStore } from '../store/store.js'
<Catalogi v-if="navigationStore.selected === 'catalogi'" />
<Organisations v-if="navigationStore.selected === 'organisations'" />
<Themes v-if="navigationStore.selected === 'themes'" />
<Catalogi v-if="navigationStore.selected === 'catalogi'" />
<Dashboard v-if="navigationStore.selected === 'dashboard'" />
<Dashboard v-if="navigationStore.selected === 'dashboard'" :search="searchStore.search" />
<Directory v-if="navigationStore.selected === 'directory'" />
<Publications v-if="navigationStore.selected === 'publication'" />
<Matadata v-if="navigationStore.selected === 'metaData'" />
Expand Down
6 changes: 5 additions & 1 deletion src/views/catalogi/CatalogiList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { catalogiStore, navigationStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -146,6 +146,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
catalogiStore.refreshCatalogiList(search)
Expand Down
20 changes: 10 additions & 10 deletions src/views/directory/DirectoryList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { navigationStore, directoryStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -86,17 +86,15 @@ import { navigationStore, directoryStore } from '../../store/store.js'
</ul>
</template>
<script>
import { debounce } from 'lodash'
import { NcListItem, NcActionButton, NcTextField, NcLoadingIcon, NcActions, NcEmptyContent, NcButton } from '@nextcloud/vue'
// eslint-disable-next-line n/no-missing-import
import Magnify from 'vue-material-design-icons/Magnify'
// eslint-disable-next-line n/no-missing-import
import LayersOutline from 'vue-material-design-icons/LayersOutline'
// Icons
import Magnify from 'vue-material-design-icons/Magnify.vue'
import LayersOutline from 'vue-material-design-icons/LayersOutline.vue'
import Plus from 'vue-material-design-icons/Plus.vue'
import Pencil from 'vue-material-design-icons/Pencil.vue'
import Delete from 'vue-material-design-icons/Delete.vue'
import Refresh from 'vue-material-design-icons/Refresh.vue'
import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue'
import { debounce } from 'lodash'
export default {
name: 'DirectoryList',
Expand All @@ -114,8 +112,6 @@ export default {
HelpCircleOutline,
Refresh,
Plus,
Pencil,
Delete,
},
beforeRouteLeave(to, from, next) {
search = ''
Expand Down Expand Up @@ -143,6 +139,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
directoryStore.refreshListingList(search)
Expand Down
6 changes: 5 additions & 1 deletion src/views/metaData/MetaDataList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { navigationStore, metadataStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -146,6 +146,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
metadataStore.refreshMetaDataList(search)
Expand Down
6 changes: 5 additions & 1 deletion src/views/organisations/OrganisationList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { navigationStore, organisationStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -149,6 +149,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
organisationStore.refreshOrganisationList(search)
Expand Down
65 changes: 35 additions & 30 deletions src/views/publications/PublicationDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -169,36 +169,41 @@ import { catalogiStore, metadataStore, navigationStore, publicationStore } from
<div class="tabContainer">
<BTabs content-class="mt-3" justified>
<BTab title="Eigenschappen" active>
<NcListItem v-for="(value, key, i) in publicationStore.publicationItem?.data"
:key="`${key}${i}`"
:name="key"
:bold="false"
:force-display-actions="true"
@click="publicationStore.setPublicationDataKey(key)
">
<template #icon>
<CircleOutline :class="publicationStore.publicationDataKey === key && 'selectedZaakIcon'"
disable-menu
:size="44" />
</template>
<template #subname>
{{ value }}
</template>
<template #actions>
<NcActionButton @click="editPublicationDataItem(key)">
<template #icon>
<Pencil :size="20" />
</template>
Bewerken
</NcActionButton>
<NcActionButton @click="deletePublicationDataItem(key)">
<template #icon>
<Delete :size="20" />
</template>
Verwijderen
</NcActionButton>
</template>
</NcListItem>
<div v-if="publicationStore.publicationItem?.data.length > 0">
<NcListItem v-for="(value, key, i) in publicationStore.publicationItem?.data"
:key="`${key}${i}`"
:name="key"
:bold="false"
:force-display-actions="true"
@click="publicationStore.setPublicationDataKey(key)
">
<template #icon>
<CircleOutline :class="publicationStore.publicationDataKey === key && 'selectedZaakIcon'"
disable-menu
:size="44" />
</template>
<template #subname>
{{ value }}
</template>
<template #actions>
<NcActionButton @click="editPublicationDataItem(key)">
<template #icon>
<Pencil :size="20" />
</template>
Bewerken
</NcActionButton>
<NcActionButton @click="deletePublicationDataItem(key)">
<template #icon>
<Delete :size="20" />
</template>
Verwijderen
</NcActionButton>
</template>
</NcListItem>
</div>
<div v-if="publicationStore.publicationItem?.data.length === 0" class="tabPanel">
Geen Eigenschappen gevonden
</div>
</BTab>
<BTab title="Bijlagen">
<div
Expand Down
6 changes: 5 additions & 1 deletion src/views/publications/PublicationList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import { navigationStore, publicationStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -227,6 +227,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
publicationStore.refreshPublicationList(search)
Expand Down
6 changes: 5 additions & 1 deletion src/views/themes/ThemeList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { navigationStore, themeStore } from '../../store/store.js'
</template>
Help
</NcActionButton>
<NcActionButton :disabled="loading" @click="fetchData">
<NcActionButton :disabled="loading" @click="refresh">
<template #icon>
<Refresh :size="20" />
</template>
Expand Down Expand Up @@ -149,6 +149,10 @@ export default {
this.fetchData()
},
methods: {
refresh(e) {
e.preventDefault()
this.fetchData()
},
fetchData(search = null) {
this.loading = true
themeStore.refreshThemeList(search)
Expand Down

0 comments on commit ebf9cb8

Please sign in to comment.