Fix for Rendering in Bank Booking
All checks were successful
Build and Push Docker Images / build-backend (push) Successful in 18s
Build and Push Docker Images / build-frontend (push) Successful in 1m7s

This commit is contained in:
2026-02-02 18:03:41 +01:00
parent 71d249d8bf
commit 59fdedfaa0

View File

@@ -36,6 +36,8 @@ const setup = async () => {
loading.value = true
if (route.params.id) {
itemInfo.value = await useEntities("bankstatements").selectSingle(route.params.id, "*, statementallocations(*, cd_id(*), ii_id(*))", undefined, undefined, true)
console.log(itemInfo.value)
}
if (itemInfo.value) oldItemInfo.value = JSON.parse(JSON.stringify(itemInfo.value))
@@ -72,8 +74,10 @@ const displayCurrency = (value, currency = "€") => {
return `${Number(value).toFixed(2).replace(".", ",")} ${currency}`
}
const separateIBAN = (input = "") => {
const separates = input.match(/.{1,4}/g)
// Angepasst: Prüft nun auch auf null/undefined, nicht nur auf leeren String
const separateIBAN = (input) => {
if (!input) return ""
const separates = input.toString().match(/.{1,4}/g)
return separates ? separates.join(" ") : input
}
@@ -226,8 +230,14 @@ setup()
</h2>
<div class="text-xs text-gray-500 flex gap-2 mt-1">
<span>{{ dayjs(itemInfo.date).format("DD.MM.YYYY") }}</span>
<span>&bull;</span>
<span class="font-mono">{{ separateIBAN(itemInfo.debIban || itemInfo.credIban) }}</span>
<template v-if="itemInfo.debIban || itemInfo.credIban">
<span>&bull;</span>
<span class="font-mono">{{ separateIBAN(itemInfo.debIban || itemInfo.credIban) }}</span>
</template>
<template v-else>
<span>&bull;</span>
<span class="italic text-gray-400">Sammelbuchung / Keine IBAN</span>
</template>
</div>
</div>
<div class="text-right">