Tasks creation (mostly)
This commit is contained in:
@@ -2,20 +2,14 @@ import { Controller } from '@hotwired/stimulus'
|
||||
|
||||
// TODO: unite with ProjectsSelectorController?
|
||||
class FormProjectsSelectorController extends Controller {
|
||||
static values = {
|
||||
frame: String
|
||||
}
|
||||
|
||||
connect() {
|
||||
console.log("Connected", this.element)
|
||||
}
|
||||
static targets = ['frame']
|
||||
|
||||
changeProject(event) {
|
||||
const loc = new URL(location)
|
||||
const selected = event.target.selectedOptions[0]
|
||||
const code = selected.dataset.code
|
||||
loc.searchParams.set('project', code)
|
||||
Turbo.visit(loc.toString(), {frame: this.frameValue})
|
||||
Turbo.visit(loc.toString(), {frame: this.frameTarget})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user