Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Jun 17, 2024
1 parent d5f627a commit d0479cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions my-app/src/routes/groups/[id=integer]/budgets/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { getCategoryNameById, routes, title } from '$lib';
import CategoryFilter from '$lib/components/CategoryFilter.svelte';
import CssIcon from '$lib/components/CssIcon.svelte';
Expand Down Expand Up @@ -39,7 +40,7 @@
</article>

{#each filteredBudgets as budget}
{@const isReadOnly = data.categories.find((c) => c.id === budget.category_id)?.is_archived}
{@const isReadOnly = data.categories.find((c) => c.id === budget.category_id).is_archived}
<article>
<header class="row jc-space-between">
<b>{budget.description}</b>
Expand All @@ -58,15 +59,14 @@
<p class="t-right" style="margin-left: auto; padding-right:5%">
{formatMoney(budget.amount)}
</p>
<a
<button
class="secondary outline btn-sm"
href="{routes.budgetDetails}/{budget.id}"
role="button"
on:click={() => goto(`${routes.budgetDetails}/${budget.id}`)}
disabled={isReadOnly}
data-tooltip="Editar"
>
<CssIcon name="pen" />
</a>
</button>
</div>
</div>
</article>
Expand Down

0 comments on commit d0479cb

Please sign in to comment.