feat: default notes (#263)

* feat: default notes

* feat: include default invoice note in recurring invoice

* feat: use default export in tw config

* fix: test and naming

* fix: consistent ui for switch in note modal

* feat: little text improvements
This commit is contained in:
Yannic Inselmann
2025-04-05 12:01:06 +02:00
committed by GitHub
parent 2aa17513e1
commit b32c334a71
16 changed files with 110 additions and 26 deletions

View File

@@ -31,6 +31,10 @@
:load-data="refreshTable"
/>
</template>
<template #cell-name="{ row }">
{{ row.data.name }}
<BaseIcon v-if="row.data.is_default" name="StarIcon" class="w-3 h-3 text-primary-400" />
</template>
<template #cell-type="{ row }">
{{ getLabelNote(row.data.type) }}
</template>
@@ -42,9 +46,7 @@
import { computed, reactive, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { useModalStore } from '@/scripts/stores/modal'
import { useDialogStore } from '@/scripts/stores/dialog'
import { useNotesStore } from '@/scripts/admin/stores/note'
import { useNotificationStore } from '@/scripts/stores/notification'
import NoteDropdown from '@/scripts/admin/components/dropdowns/NoteIndexDropdown.vue'
import NoteModal from '@/scripts/admin/components/modal-components/NoteModal.vue'
import { useUserStore } from '@/scripts/admin/stores/user'
@@ -53,9 +55,7 @@ import abilities from '@/scripts/admin/stub/abilities'
const { t } = useI18n()
const modalStore = useModalStore()
const dialogStore = useDialogStore()
const noteStore = useNotesStore()
const notificationStore = useNotificationStore()
const userStore = useUserStore()
const table = ref('')
@@ -66,7 +66,7 @@ const notesColumns = computed(() => {
key: 'name',
label: t('settings.customization.notes.name'),
thClass: 'extra',
tdClass: 'font-medium text-gray-900',
tdClass: 'font-medium text-gray-900 flex gap-1 items-center',
},
{
key: 'type',