Skip to content

Commit

Permalink
Show badge when habit is archived
Browse files Browse the repository at this point in the history
  • Loading branch information
daya0576 committed Dec 1, 2024
1 parent b43cf96 commit 6967a05
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions beaverhabits/frontend/order_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,12 @@ def add_ui(habit_list: HabitList):

ui.space()

if item.status == HabitStatus.ACTIVE:
badge = HabitTotalBadge(item)
badge.props("color=grey-9")
else:

if item.status == HabitStatus.ARCHIVED:
btn = HabitDeleteButton(item, habit_list, add_ui.refresh)
btn.classes("opacity-0")
card.btn = btn
badge = HabitTotalBadge(item)
badge.props("color=grey-9")

# Placeholder for moving habit to the end to archive
ui.space()
Expand Down

0 comments on commit 6967a05

Please sign in to comment.