Fix for Rendering in Bank Booking
This commit is contained in:
@@ -36,6 +36,8 @@ const setup = async () => {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
if (route.params.id) {
|
if (route.params.id) {
|
||||||
itemInfo.value = await useEntities("bankstatements").selectSingle(route.params.id, "*, statementallocations(*, cd_id(*), ii_id(*))", undefined, undefined, true)
|
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))
|
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}`
|
return `${Number(value).toFixed(2).replace(".", ",")} ${currency}`
|
||||||
}
|
}
|
||||||
|
|
||||||
const separateIBAN = (input = "") => {
|
// Angepasst: Prüft nun auch auf null/undefined, nicht nur auf leeren String
|
||||||
const separates = input.match(/.{1,4}/g)
|
const separateIBAN = (input) => {
|
||||||
|
if (!input) return ""
|
||||||
|
const separates = input.toString().match(/.{1,4}/g)
|
||||||
return separates ? separates.join(" ") : input
|
return separates ? separates.join(" ") : input
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -226,8 +230,14 @@ setup()
|
|||||||
</h2>
|
</h2>
|
||||||
<div class="text-xs text-gray-500 flex gap-2 mt-1">
|
<div class="text-xs text-gray-500 flex gap-2 mt-1">
|
||||||
<span>{{ dayjs(itemInfo.date).format("DD.MM.YYYY") }}</span>
|
<span>{{ dayjs(itemInfo.date).format("DD.MM.YYYY") }}</span>
|
||||||
<span>•</span>
|
<template v-if="itemInfo.debIban || itemInfo.credIban">
|
||||||
<span class="font-mono">{{ separateIBAN(itemInfo.debIban || itemInfo.credIban) }}</span>
|
<span>•</span>
|
||||||
|
<span class="font-mono">{{ separateIBAN(itemInfo.debIban || itemInfo.credIban) }}</span>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<span>•</span>
|
||||||
|
<span class="italic text-gray-400">Sammelbuchung / Keine IBAN</span>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
|
|||||||
Reference in New Issue
Block a user