Task creation (workflow dependent frames)

This commit is contained in:
2026-03-21 15:20:04 +02:00
parent fb9d884313
commit 218e8a750e
5 changed files with 31 additions and 17 deletions
@@ -0,0 +1,18 @@
import { Controller } from '@hotwired/stimulus'
// TODO: unite with ProjectsSelectorController?
class DependentFramesSelectorController extends Controller {
static values = {'param': String}
static targets = ['frame']
refresh(event) {
const loc = new URL(location)
const selected = event.target.selectedOptions[0]
const value = selected.dataset.code || selected.value
loc.searchParams.set(this.paramValue, value)
Turbo.visit(loc.toString(), {frame: this.frameTarget})
}
}
export default DependentFramesSelectorController