Task status selector in index
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
class StatusSelectorController extends Controller {
|
||||
static targets = ['form', 'statusField']
|
||||
|
||||
changeStatus(event) {
|
||||
let statusId = event.currentTarget.dataset.statusId
|
||||
this.statusFieldTarget.value = statusId
|
||||
this.formTarget.requestSubmit()
|
||||
}
|
||||
|
||||
finalize() {
|
||||
this.element.open = false
|
||||
}
|
||||
}
|
||||
|
||||
export default StatusSelectorController
|
||||
Reference in New Issue
Block a user