KI-AGENT: Notizen für Bankbuchungen ergänzt
This commit is contained in:
@@ -39,6 +39,7 @@ const ownaccounts = ref([])
|
||||
|
||||
const loading = ref(true)
|
||||
const loadingDocuments = ref(true)
|
||||
const savingNotes = ref(false)
|
||||
|
||||
const rebuildDocumentLists = () => {
|
||||
const documents = createddocuments.value.filter(i => i.type === "invoices" || i.type === "advanceInvoices")
|
||||
@@ -260,6 +261,22 @@ const removeAllocation = async (allocationId) => {
|
||||
manualAllocationSum.value = calculateOpenSum.value
|
||||
}
|
||||
|
||||
const saveNotes = async () => {
|
||||
savingNotes.value = true
|
||||
try {
|
||||
const notes = String(itemInfo.value.notes || "").trim() || null
|
||||
const updated = await useEntities("bankstatements").update(itemInfo.value.id, {notes}, true)
|
||||
itemInfo.value.notes = updated.notes
|
||||
oldItemInfo.value.notes = updated.notes
|
||||
} finally {
|
||||
savingNotes.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const notesChanged = computed(() =>
|
||||
String(itemInfo.value?.notes || "").trim() !== String(oldItemInfo.value?.notes || "").trim()
|
||||
)
|
||||
|
||||
const searchString = ref(tempStore.searchStrings["bankstatementsedit"] || '')
|
||||
|
||||
const clearSearchString = () => {
|
||||
@@ -595,6 +612,28 @@ setup()
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
<UFormField label="Notiz" size="sm">
|
||||
<UTextarea
|
||||
v-model="itemInfo.notes"
|
||||
:rows="3"
|
||||
autoresize
|
||||
placeholder="Interne Notiz zu dieser Bankbuchung hinzufügen …"
|
||||
/>
|
||||
</UFormField>
|
||||
<div class="mt-2 flex justify-end">
|
||||
<UButton
|
||||
icon="i-heroicons-check"
|
||||
size="sm"
|
||||
:disabled="!notesChanged"
|
||||
:loading="savingNotes"
|
||||
@click="saveNotes"
|
||||
>
|
||||
Notiz speichern
|
||||
</UButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-4">
|
||||
<div class="flex justify-between text-xs mb-1 font-medium">
|
||||
<span :class="calculateOpenSum != 0 ? 'text-amber-600' : 'text-green-600'">
|
||||
|
||||
Reference in New Issue
Block a user