Overview for refunds
This commit is contained in:
@@ -60,6 +60,7 @@ const refundErrors = reactive({amount: '', reason: '', reasonNote: '', accountOw
|
||||
const refundReasons = ref([]);
|
||||
const retentionReasons = ref([]);
|
||||
const refundSaving = ref(false);
|
||||
const refundResending = ref(false);
|
||||
|
||||
const selectedRefundReason = computed(
|
||||
() => refundReasons.value.find(r => r.value === refundForm.reason) ?? null
|
||||
@@ -498,6 +499,32 @@ async function execCancelRefund(participant) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Die Mail zur freigegebenen Erstattung noch einmal schicken -- ohne Rückfrage, es ändert sich nichts am
|
||||
* Vorgang. Der Guard verhindert, dass ein zweiter Klick eine zweite Mail auslöst, bevor die erste durch ist.
|
||||
*/
|
||||
async function execResendRefundMail(participant) {
|
||||
if (refundResending.value) {
|
||||
return;
|
||||
}
|
||||
|
||||
refundResending.value = true;
|
||||
|
||||
try {
|
||||
const data = await request('/api/v1/participant-refund/' + participant.refund.token + '/resend-mail', {
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
if (data?.status === 'success') {
|
||||
toast.success(data.message);
|
||||
} else {
|
||||
toast.error(data?.message ?? 'Die Rückerstattungsmail konnte nicht versendet werden.');
|
||||
}
|
||||
} finally {
|
||||
refundResending.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
async function downloadRefundDocument(participant) {
|
||||
const ok = await download('/api/v1/participant-refund/' + participant.refund.token + '/document');
|
||||
|
||||
@@ -629,8 +656,9 @@ function mailToGroup(groupKey) {
|
||||
> | Beitrag erstatten</span>
|
||||
|
||||
<template v-else-if="participant.refund?.status === 'pending'">
|
||||
| <strong>Erstattung offen:</strong> {{ participant.refund.amount }},
|
||||
wartet auf Bankverbindung
|
||||
| <strong>Rückerstattung vorgemerkt:</strong> {{ participant.refund.amount }}
|
||||
am {{ participant.refund.releasedAt }}, wartet auf Bankverbindung
|
||||
<span class="link" @click="execResendRefundMail(participant)">Rückerstattungsmail erneut senden</span>
|
||||
<span class="link" style="color: #da7070;" @click="execCancelRefund(participant)">Abbrechen</span>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user