Compare commits
3 Commits
5dcb4cb508
...
32f72df105
Author | SHA1 | Date | |
---|---|---|---|
32f72df105 | |||
724e84441e | |||
ecd418c5db |
@ -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
|
||||
|
@ -112,18 +112,25 @@
|
||||
accessorKey: "actions",
|
||||
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, {
|
||||
detailsLink: `./${info.row.original.id}`,
|
||||
detailsLink: detailsLink,
|
||||
deleteAction: () => {
|
||||
active_deletes = current_donations.filter(
|
||||
(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"
|
||||
|
@ -15,6 +15,8 @@
|
||||
<button on:click={detailsAction} class="text-indigo-600 hover:text-indigo-900"
|
||||
>{$_("details")}</button
|
||||
>
|
||||
{:else}
|
||||
<span class="inline-block opacity-0 cursor-default" style="">{$_("details")}</span>
|
||||
{/if}
|
||||
{#if deleteEnabled}
|
||||
<button
|
||||
|
Loading…
x
Reference in New Issue
Block a user