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
This commit is contained in:
@@ -52,8 +52,11 @@ export default class extends Controller {
|
||||
this.#show()
|
||||
}
|
||||
|
||||
// Keep in sync with Card::Stallable#stalled? in app/models/card/stallable.rb
|
||||
get #isStalled() {
|
||||
return this.stalledValue.lastActivitySpikeAt && signedDifferenceInDays(new Date(this.stalledValue.lastActivitySpikeAt), new Date()) > this.stalledValue.stalledAfterDays
|
||||
return this.stalledValue.lastActivitySpikeAt &&
|
||||
signedDifferenceInDays(new Date(this.stalledValue.lastActivitySpikeAt), new Date()) > this.stalledValue.stalledAfterDays &&
|
||||
signedDifferenceInDays(new Date(this.stalledValue.updatedAt), new Date()) > this.stalledValue.stalledAfterDays
|
||||
}
|
||||
|
||||
#showStalled() {
|
||||
|
||||
Reference in New Issue
Block a user