Zahlungsparser

This commit is contained in:
2026-09-09 16:55:08 +02:00
parent ae13841699
commit 651b6147bf
38 changed files with 3308 additions and 22 deletions
@@ -26,6 +26,18 @@ const paymentMethodConfigurations = reactive({})
const showOptionsModal = ref(false)
const optionsMethod = ref(null)
/**
* Die Optionen, die pro Aktion eingefroren werden.
*
* Optionen mit `scope: 'tenant'` bleiben draußen: Sie gelten für den ganzen Mandanten. Das
* Kontoauszug-Format etwa beschreibt die Bank, nicht die Zusage an die Teilnehmenden — hier
* eingefroren ließe sich nach einem Bankwechsel für laufende Aktionen nichts mehr importieren.
* Der Server hält sich beim Speichern an dieselbe Regel.
*/
function eventOptions(method) {
return (method?.optionsSchema ?? []).filter(option => option.scope !== 'tenant')
}
function openOptions(method) {
optionsMethod.value = method
showOptionsModal.value = true
@@ -47,7 +59,7 @@ onMounted(async () => {
for (const method of availablePaymentMethods.value) {
const source = eventConfigBySlug[method.slug] ?? method.configuration ?? {}
const config = {}
for (const option of method.optionsSchema ?? []) {
for (const option of eventOptions(method)) {
config[option.name] = source[option.name] ?? ''
}
paymentMethodConfigurations[method.slug] = config
@@ -358,7 +370,7 @@ onMounted(async () => {
paymentMethod.name
}}</label>
<label
v-if="paymentMethods.includes(paymentMethod.slug) && (paymentMethod.optionsSchema?.length ?? 0) > 0"
v-if="paymentMethods.includes(paymentMethod.slug) && eventOptions(paymentMethod).length > 0"
class="link"
style="padding-left: 15px; font-size: 10pt;"
@click="openOptions(paymentMethod)"
@@ -381,7 +393,7 @@ onMounted(async () => {
width="700px"
@close="showOptionsModal = false"
>
<div v-for="option in optionsMethod?.optionsSchema ?? []" :key="option.name" class="payment-method-config-row">
<div v-for="option in eventOptions(optionsMethod)" :key="option.name" class="payment-method-config-row">
<label>{{ option.label }}<span v-if="option.required" class="required-marker">*</span></label>
<RichSelectBox v-if="option.type === 'icon'"
v-model="paymentMethodConfigurations[optionsMethod.slug][option.name]"