diff --git a/app/Filament/Resources/ProductionLineStopResource/Pages/CreateProductionLineStop.php b/app/Filament/Resources/ProductionLineStopResource/Pages/CreateProductionLineStop.php index 37ca32d21..c7112261f 100644 --- a/app/Filament/Resources/ProductionLineStopResource/Pages/CreateProductionLineStop.php +++ b/app/Filament/Resources/ProductionLineStopResource/Pages/CreateProductionLineStop.php @@ -9,4 +9,9 @@ use Filament\Resources\Pages\CreateRecord; class CreateProductionLineStop extends CreateRecord { protected static string $resource = ProductionLineStopResource::class; + + protected function getRedirectUrl(): string + { + return $this->getResource()::getUrl('create'); // Stay on Create Page after saving + } } diff --git a/app/Filament/Resources/ProductionQuantityResource/Pages/CreateProductionQuantity.php b/app/Filament/Resources/ProductionQuantityResource/Pages/CreateProductionQuantity.php index 0ad7efbbf..39950ff1e 100644 --- a/app/Filament/Resources/ProductionQuantityResource/Pages/CreateProductionQuantity.php +++ b/app/Filament/Resources/ProductionQuantityResource/Pages/CreateProductionQuantity.php @@ -9,4 +9,9 @@ use Filament\Resources\Pages\CreateRecord; class CreateProductionQuantity extends CreateRecord { protected static string $resource = ProductionQuantityResource::class; + + protected function getRedirectUrl(): string + { + return $this->getResource()::getUrl('create'); // Stay on Create Page after saving + } } diff --git a/app/Filament/Resources/QualityValidationResource/Pages/CreateQualityValidation.php b/app/Filament/Resources/QualityValidationResource/Pages/CreateQualityValidation.php index 8e8da5fd0..dee80c381 100644 --- a/app/Filament/Resources/QualityValidationResource/Pages/CreateQualityValidation.php +++ b/app/Filament/Resources/QualityValidationResource/Pages/CreateQualityValidation.php @@ -4,6 +4,7 @@ namespace App\Filament\Resources\QualityValidationResource\Pages; use App\Filament\Resources\QualityValidationResource; use Filament\Actions; +use Filament\Forms\Components\Component; use Filament\Resources\Pages\CreateRecord; use Illuminate\Validation\ValidationException; @@ -11,6 +12,7 @@ class CreateQualityValidation extends CreateRecord { protected static string $resource = QualityValidationResource::class; + protected function beforeCreate(): void { $errors = []; @@ -91,4 +93,10 @@ class CreateQualityValidation extends CreateRecord throw ValidationException::withMessages($errors); } } + + protected function getRedirectUrl(): string + { + return $this->getResource()::getUrl('create'); // Stay on Create Page after saving + } + }