Skip to content

Commit

Permalink
feat: improve budget list
Browse files Browse the repository at this point in the history
  • Loading branch information
MegaRedHand committed Jun 17, 2024
1 parent c241ec7 commit d5f627a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion my-app/src/routes/groups/[id=integer]/budgets/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@
</article>

{#each filteredBudgets as budget}
{@const isReadOnly = data.categories.find((c) => c.id === budget.category_id)?.is_archived}
<article>
<header class="row jc-space-between">
<b>{budget.description}</b>
<p>{getCategoryNameById(data.categories, budget.category_id)}</p>
<p>
{#if isReadOnly}
<span class="no-underline" data-tooltip="Archivada">
<CssIcon name="lock" />
</span>
{/if}
{getCategoryNameById(data.categories, budget.category_id)}
</p>
</header>
<div class="grid">
{formatDateString(budget.start_date)} — {formatDateString(budget.end_date)}
Expand All @@ -54,6 +62,7 @@
class="secondary outline btn-sm"
href="{routes.budgetDetails}/{budget.id}"
role="button"
disabled={isReadOnly}
data-tooltip="Editar"
>
<CssIcon name="pen" />
Expand Down

0 comments on commit d5f627a

Please sign in to comment.