Intentando integrar con air-datepicker

This commit is contained in:
2025-01-26 14:36:46 -03:00
parent 85ae2d033e
commit b7a79e9479
6 changed files with 45 additions and 6 deletions

View File

@@ -38,8 +38,8 @@ class Index extends Component
$this->fecha = now()->format('Y-m-d');
$this->caja = 1;
if (Turno::where('fecha', $this->fecha)->exists()) {
$this->turno = Turno::where('fecha', $this->fecha)->max('numero_turno') + 1;
if (Turno::where('fecha', now())->exists()) {
$this->turno = Turno::where('fecha', now())->max('numero_turno') + 1;
} else {
$this->turno = 1;
}