fix(donations): Don't show enter payment for anon donations
This commit is contained in:
parent
724e84441e
commit
32f72df105
@ -9,10 +9,15 @@
|
|||||||
export let paymentAction;
|
export let paymentAction;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{#if paymentAction}
|
||||||
<button
|
<button
|
||||||
on:click={paymentAction}
|
on:click={paymentAction}
|
||||||
class="text-[#025a21] hover:text-green-900 mr-4">{$_("enter-payment")}</button
|
class="text-[#025a21] hover:text-green-900 mr-4">{$_("enter-payment")}</button
|
||||||
>
|
>
|
||||||
|
{:else}
|
||||||
|
<span class="inline-block opacity-0 cursor-default mr-4" style="">{$_("enter-payment")}</span>
|
||||||
|
|
||||||
|
{/if}
|
||||||
<TableActions
|
<TableActions
|
||||||
bind:detailsAction
|
bind:detailsAction
|
||||||
bind:detailsLink
|
bind:detailsLink
|
||||||
|
@ -113,8 +113,14 @@
|
|||||||
header: () => $_("action"),
|
header: () => $_("action"),
|
||||||
cell: (info) => {
|
cell: (info) => {
|
||||||
let detailsLink
|
let detailsLink
|
||||||
|
let paymentAction
|
||||||
if (info.row.original.donor != undefined){
|
if (info.row.original.donor != undefined){
|
||||||
detailsLink = `./${info.row.original.id}`
|
detailsLink = `./${info.row.original.id}`
|
||||||
|
paymentAction = () => {
|
||||||
|
active_edits = current_donations.filter(
|
||||||
|
(r) => r.id == info.row.original.id
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return renderComponent(DonationTableAction, {
|
return renderComponent(DonationTableAction, {
|
||||||
@ -124,11 +130,7 @@
|
|||||||
(r) => r.id == info.row.original.id
|
(r) => r.id == info.row.original.id
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
paymentAction: () => {
|
paymentAction: paymentAction,
|
||||||
active_edits = current_donations.filter(
|
|
||||||
(r) => r.id == info.row.original.id
|
|
||||||
);
|
|
||||||
},
|
|
||||||
deleteEnabled:
|
deleteEnabled:
|
||||||
store.state.jwtinfo.userdetails.permissions.includes(
|
store.state.jwtinfo.userdetails.permissions.includes(
|
||||||
"DONATION:DELETE"
|
"DONATION:DELETE"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user