This commit is contained in:
lizandrogd
2026-01-19 20:08:43 -05:00
parent 132b266948
commit 2e819edbd3
5 changed files with 60 additions and 0 deletions
@@ -29,6 +29,12 @@ class EditConfeccion extends EditRecord
->maxValue(fn () => $this->getRecord()->faltantes ?? 0)
->helperText(fn () => 'Máximo: ' . ($this->getRecord()->faltantes ?? 0))
->default(fn () => $this->getRecord()->faltantes ?? 0),
Forms\Components\TextInput::make('prendas_defectuosas')
->numeric()
->minValue(0)
->maxValue(fn ($get) => (int) ($get('cantidad') ?? 0))
->helperText('Opcional. Se restará del total recibido.'),
Forms\Components\Textarea::make('notas'),
])
->action(function (array $data): void {
@@ -29,6 +29,13 @@ class RecepcionesRelationManager extends RelationManager
->minValue(1)
->maxValue(fn () => $this->getOwnerRecord()?->faltantes ?? 0)
->helperText(fn () => 'Máximo: ' . ($this->getOwnerRecord()?->faltantes ?? 0)),
TextInput::make('prendas_defectuosas')
->numeric()
->minValue(0)
->maxValue(fn ($get) => (int) ($get('cantidad') ?? 0))
->helperText('Opcional. Se restará del total recibido.'),
Textarea::make('notas'),
]);
}
@@ -29,6 +29,13 @@ class RecepcionesRelationManager extends RelationManager
->minValue(1)
->maxValue(fn () => $this->getOwnerRecord()?->faltantes ?? 0)
->helperText(fn () => 'Máximo: ' . ($this->getOwnerRecord()?->faltantes ?? 0)),
TextInput::make('prendas_defectuosas')
->numeric()
->minValue(0)
->maxValue(fn ($get) => (int) ($get('cantidad') ?? 0))
->helperText('Opcional. Se restará del total recibido.'),
Textarea::make('notas'),
]);
}