Grande correção do filtro de veiculos na area de consolidação
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ["modal", "quantidade", "erro"]
|
||||
static targets = ["modal", "quantidade", "erro", "veiculo"]
|
||||
static values = { apontarTermoUrl: String, motorista: String }
|
||||
|
||||
abrir() {
|
||||
@@ -55,7 +55,11 @@ export default class extends Controller {
|
||||
"Accept": "application/json",
|
||||
"X-CSRF-Token": document.querySelector('meta[name="csrf-token"]').content
|
||||
},
|
||||
body: JSON.stringify({ motorista: motorista, quantidade: quantidade })
|
||||
body: JSON.stringify({
|
||||
motorista: motorista,
|
||||
quantidade: quantidade,
|
||||
vehicle: this.hasVeiculoTarget ? this.veiculoTarget.value : ""
|
||||
})
|
||||
})
|
||||
const data = await resp.json()
|
||||
if (!resp.ok || data.ok === false) {
|
||||
|
||||
Reference in New Issue
Block a user