mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-07 13:41:23 +00:00
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:
6
resources/scripts/admin/stores/note.js
vendored
6
resources/scripts/admin/stores/note.js
vendored
@@ -14,6 +14,7 @@ export const useNotesStore = (useWindow = false) => {
|
||||
currentNote: {
|
||||
id: null,
|
||||
type: '',
|
||||
is_default: false,
|
||||
name: '',
|
||||
notes: '',
|
||||
},
|
||||
@@ -24,9 +25,14 @@ export const useNotesStore = (useWindow = false) => {
|
||||
},
|
||||
|
||||
actions: {
|
||||
getDefaultNoteForType(type) {
|
||||
return this.notes.find((note) => note.type === type && note.is_default)
|
||||
},
|
||||
|
||||
resetCurrentNote() {
|
||||
this.currentNote = {
|
||||
type: '',
|
||||
is_default: false,
|
||||
name: '',
|
||||
notes: '',
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user