Files
fizzy/app/helpers/entropy_helper.rb
T
Mike Dalessio 9c76002bc1 Completing a step removes stalled status from UI
Add `updatedAt` to stalled bubble options so JS can check if the card
was recently updated, matching the `Card::Stallable#stalled?`
logic. Refresh the bubble via Turbo Stream when a step is updated.

This should have been part of #1625

Fixes https://app.fizzy.do/5986089/cards/3668
2026-01-16 09:58:21 -05:00

25 lines
590 B
Ruby

module EntropyHelper
def entropy_auto_close_options
[ 3, 7, 30, 90, 365, 11 ]
end
def entropy_bubble_options_for(card)
{
daysBeforeReminder: card.entropy.days_before_reminder,
closesAt: card.entropy.auto_clean_at.iso8601,
action: "Closes"
}
end
def stalled_bubble_options_for(card)
if card.last_activity_spike_at
{
stalledAfterDays: card.entropy.days_before_reminder,
lastActivitySpikeAt: card.last_activity_spike_at.iso8601,
updatedAt: card.updated_at.iso8601,
action: "Stalled"
}
end
end
end