Dev 4.8.0 #15
@@ -512,7 +512,7 @@ function mailToGroup(groupKey) {
|
|||||||
<span
|
<span
|
||||||
v-if="!participant.refund && Number(participant.amountPaidValue ?? 0) > 0"
|
v-if="!participant.refund && Number(participant.amountPaidValue ?? 0) > 0"
|
||||||
class="link"
|
class="link"
|
||||||
style="color: #3cb62e;"
|
style="color: #da7070;"
|
||||||
@click="openRefundDialog(participant)"
|
@click="openRefundDialog(participant)"
|
||||||
> | Beitrag erstatten</span>
|
> | Beitrag erstatten</span>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import {reactive, ref} from 'vue'
|
import {computed, reactive, ref} from 'vue'
|
||||||
import {toast} from 'vue3-toastify'
|
import {toast} from 'vue3-toastify'
|
||||||
import AppLayout from '../../../../resources/js/layouts/AppLayout.vue'
|
import AppLayout from '../../../../resources/js/layouts/AppLayout.vue'
|
||||||
import ShadowedBox from '../../../Views/Components/ShadowedBox.vue'
|
import ShadowedBox from '../../../Views/Components/ShadowedBox.vue'
|
||||||
@@ -36,6 +36,18 @@ const form = reactive({accountOwner: '', accountIban: '', declarationAccepted: f
|
|||||||
const errors = reactive({accountOwner: '', accountIban: '', declaration: ''})
|
const errors = reactive({accountOwner: '', accountIban: '', declaration: ''})
|
||||||
const saving = ref(false)
|
const saving = ref(false)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Die Erklärung erscheint erst, wenn beide Kontoangaben stehen -- man bestätigt nichts, bevor man weiß,
|
||||||
|
* worüber. Dasselbe Vorgehen wie beim Erfassen einer Abrechnung (refund-data.vue).
|
||||||
|
*
|
||||||
|
* Dort wird zusätzlich auf `iban.length === 27` geprüft, also auf die Länge einer formatierten deutschen
|
||||||
|
* IBAN. Das bleibt hier bewusst weg: eine österreichische oder schweizerische käme sonst nie durch. Ob
|
||||||
|
* die IBAN stimmt, prüft der Server mit Prüfziffer und länderabhängiger Länge.
|
||||||
|
*/
|
||||||
|
const accountComplete = computed(
|
||||||
|
() => form.accountOwner.trim() !== '' && form.accountIban.trim() !== ''
|
||||||
|
)
|
||||||
|
|
||||||
function validate() {
|
function validate() {
|
||||||
errors.accountOwner = form.accountOwner.trim() ? '' : 'Bitte gib an, wem das Konto gehört.'
|
errors.accountOwner = form.accountOwner.trim() ? '' : 'Bitte gib an, wem das Konto gehört.'
|
||||||
errors.accountIban = form.accountIban.trim() ? '' : 'Bitte gib die IBAN des Kontos ein.'
|
errors.accountIban = form.accountIban.trim() ? '' : 'Bitte gib die IBAN des Kontos ein.'
|
||||||
@@ -155,6 +167,7 @@ async function submit() {
|
|||||||
gelesen und angekreuzt werden -- sonst schriebe der Beleg dem Teili eine
|
gelesen und angekreuzt werden -- sonst schriebe der Beleg dem Teili eine
|
||||||
Zusicherung zu, die er nie abgegeben hat.
|
Zusicherung zu, die er nie abgegeben hat.
|
||||||
-->
|
-->
|
||||||
|
<template v-if="accountComplete">
|
||||||
<div class="declaration">
|
<div class="declaration">
|
||||||
<input
|
<input
|
||||||
id="refund-declaration"
|
id="refund-declaration"
|
||||||
@@ -168,9 +181,17 @@ async function submit() {
|
|||||||
</div>
|
</div>
|
||||||
<ErrorText :message="errors.declaration" />
|
<ErrorText :message="errors.declaration" />
|
||||||
|
|
||||||
<button class="button" type="submit" :disabled="saving || !form.declarationAccepted">
|
<!-- Beim Speichern gesperrt statt ausgeblendet, sonst verschwände der Knopf
|
||||||
|
unter dem Finger. -->
|
||||||
|
<button
|
||||||
|
v-if="form.declarationAccepted"
|
||||||
|
class="button"
|
||||||
|
type="submit"
|
||||||
|
:disabled="saving"
|
||||||
|
>
|
||||||
{{ saving ? 'Wird gespeichert…' : 'Angaben absenden' }}
|
{{ saving ? 'Wird gespeichert…' : 'Angaben absenden' }}
|
||||||
</button>
|
</button>
|
||||||
|
</template>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user