Skip to content
Snippets Groups Projects
Commit 59f46dd6 authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt :koala:
Browse files

feat: add language and topic selection for Notes

fixes #189
parent dbb6f3e1
No related branches found
No related tags found
No related merge requests found
Pipeline #7020 passed
......@@ -78,6 +78,18 @@
<ComboBoxSimple v-model="contributors.value" :choices="contributors.choices" />
</FormGroup>
<FormGroup :label="t('noteEditor.topics')" :errors="topics.errors" :is-saving="topics.isSaving">
<ComboBoxSimple v-model="topics.value" :choices="topics.choices" />
</FormGroup>
<FormGroup
:label="t('noteEditor.languages')"
:errors="languages.errors"
:is-saving="languages.isSaving"
>
<ComboBoxSimple v-model="languages.value" :choices="languages.choices" />
</FormGroup>
<FormGroup :label="t('noteEditor.tags')" :errors="tags.errors" :is-saving="tags.isSaving">
<TagInput v-model="tags.value" />
</FormGroup>
......@@ -90,7 +102,7 @@ import { computed } from 'vue'
import { useI18n } from '@/i18n'
import { Note, Show, TimeSlot } from '@/types'
import { useHostStore, useNoteStore } from '@/stores'
import { useHostStore, useLanguageStore, useNoteStore, useTopicStore } from '@/stores'
import FormGroup from '@/components/generic/FormGroup.vue'
import ImagePicker from '@/components/images/ImagePicker.vue'
import TagInput from '@/components/generic/TagInput.vue'
......@@ -110,6 +122,8 @@ const props = defineProps<{
const { t } = useI18n()
const noteStore = useNoteStore()
const hostStore = useHostStore()
const languageStore = useLanguageStore()
const topicStore = useTopicStore()
const note = computed(() => props.note)
const summary = useAPIObjectFieldCopy(noteStore, note, 'summary', { noAutoSave: true })
......@@ -117,6 +131,8 @@ const content = useAPIObjectFieldCopy(noteStore, note, 'content', { noAutoSave:
const tags = useAPIObjectFieldCopy(noteStore, note, 'tags')
const imageId = useAPIObjectFieldCopy(noteStore, note, 'imageId', { debounce: 0 })
const contributors = useRelationList(noteStore, note, 'contributorIds', hostStore)
const languages = useRelationList(noteStore, note, 'languageIds', languageStore)
const topics = useRelationList(noteStore, note, 'topicIds', topicStore)
const { update, errorMap, isSaving } = useUpdateBehaviour(noteStore.partialUpdate, { obj: note })
const title = useCopy(() => note.value.title, { save: updateTitle })
......
......@@ -505,6 +505,8 @@ export default {
image: 'Bild',
tags: 'Schlagwörter',
contributors: 'Mitwirkende',
languages: 'Sprachen',
topics: 'Themen',
},
error: {
......
......@@ -497,6 +497,8 @@ export default {
image: 'Image',
tags: 'Tags',
contributors: 'Contributors',
languages: 'Languages',
topics: 'Topics',
},
error: {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment