Icons for payment methods
This commit is contained in:
@@ -15,10 +15,13 @@ const selectedMethod = computed(() =>
|
||||
|
||||
const participantSchema = computed(() => selectedMethod.value?.participantOptionsSchema ?? [])
|
||||
|
||||
// Font-Awesome-Icon je Zahlungsart (Fallback: generische Karte).
|
||||
function iconFor(slug) {
|
||||
if (slug === 'PAYMENT_ACCOUNT_TRANSACTION') return 'building-columns'
|
||||
if (slug === 'PAYMENT_NOT_DEFINED') return 'money-bill-wave'
|
||||
// Font-Awesome-Icon je Zahlungsart: konfiguriertes Symbol hat Vorrang, sonst Slug-Default
|
||||
// (Fallback: generische Karte).
|
||||
function iconFor(method) {
|
||||
const configured = method.configuration?.icon
|
||||
if (configured) return configured
|
||||
if (method.slug === 'PAYMENT_ACCOUNT_TRANSACTION') return 'building-columns'
|
||||
if (method.slug === 'PAYMENT_NOT_DEFINED') return 'money-bill-wave'
|
||||
return 'credit-card'
|
||||
}
|
||||
|
||||
@@ -60,7 +63,7 @@ const canProceed = computed(() => {
|
||||
@keydown.space.prevent="selectMethod(method.slug)"
|
||||
>
|
||||
<div class="pay-card__badge">
|
||||
<Icon :name="iconFor(method.slug)"/>
|
||||
<Icon :name="iconFor(method)"/>
|
||||
</div>
|
||||
<div class="pay-card__body">
|
||||
<h4 class="pay-card__title">{{ method.name }}</h4>
|
||||
|
||||
Reference in New Issue
Block a user