fix(donations): Don't show enter payment for anon donations
This commit is contained in:
		| @@ -9,10 +9,15 @@ | ||||
|   export let paymentAction; | ||||
| </script> | ||||
|  | ||||
| {#if paymentAction} | ||||
| <button | ||||
|   on:click={paymentAction} | ||||
|   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 | ||||
|   bind:detailsAction | ||||
|   bind:detailsLink | ||||
|   | ||||
| @@ -113,8 +113,14 @@ | ||||
|       header: () => $_("action"), | ||||
|       cell: (info) => { | ||||
|         let detailsLink | ||||
|         let paymentAction | ||||
|         if (info.row.original.donor != undefined){ | ||||
|           detailsLink = `./${info.row.original.id}` | ||||
|           paymentAction = () => { | ||||
|             active_edits = current_donations.filter( | ||||
|               (r) => r.id == info.row.original.id | ||||
|             ); | ||||
|           } | ||||
|         } | ||||
|          | ||||
|         return renderComponent(DonationTableAction, { | ||||
| @@ -124,11 +130,7 @@ | ||||
|               (r) => r.id == info.row.original.id | ||||
|             ); | ||||
|           }, | ||||
|           paymentAction: () => { | ||||
|             active_edits = current_donations.filter( | ||||
|               (r) => r.id == info.row.original.id | ||||
|             ); | ||||
|           }, | ||||
|           paymentAction: paymentAction, | ||||
|           deleteEnabled: | ||||
|             store.state.jwtinfo.userdetails.permissions.includes( | ||||
|               "DONATION:DELETE" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user