Always show the stage picker, cards in Considering are unstaged

This commit is contained in:
Jason Zimdars
2025-09-22 10:55:22 -05:00
parent d90f603ca9
commit 2ea2e65f04
4 changed files with 13 additions and 3 deletions
+7 -1
View File
@@ -2,7 +2,13 @@ class Cards::StagingsController < ApplicationController
include CardScoped
def update
@card.change_stage_to @collection.workflow.stages.find(params[:stage_id])
stage = @collection.workflow.stages.find(params[:stage_id])
if @card.considering?
@card.engage
end
@card.change_stage_to(stage)
render_card_replacement
end
end
+4
View File
@@ -56,6 +56,7 @@ module Card::Engageable
reopen
engagement&.destroy
activity_spike&.destroy
update!(stage: nil)
touch_last_active_at
end
end
@@ -66,6 +67,9 @@ module Card::Engageable
reopen
engagement&.destroy
create_engagement!(status:)
if status == "doing" && stage.blank?
update!(stage: collection.initial_workflow_stage)
end
end
end
end
+1 -1
View File
@@ -21,7 +21,7 @@
<%= render "cards/container/title", card: card %>
<%= render "cards/display/perma/steps", card: card %>
</div>
<%= render "cards/stagings/stages", card: card if card.doing? %>
<%= render "cards/stagings/stages", card: card if card.open? %>
</div>
<footer class="card__footer full-width flex align-start gap">
+1 -1
View File
@@ -9,7 +9,7 @@
<%= render "cards/display/preview/steps", card: card %>
<%= icon_tag "attachment", class: "card__attachments-indicator translucent txt-x-small" if card.has_attachments? %>
<% if card.staged? && card.doing? %>
<% if card.staged? && card.open? %>
<span class="btn justify-start workflow-stage workflow-stage--current txt-uppercase min-width max-width">
<span class="overflow-ellipsis "><%= card.stage.name %></span>
</span>