diff --git a/app/Filament/Resources/ProductionPlanResource.php b/app/Filament/Resources/ProductionPlanResource.php index 86145153d..404905d63 100644 --- a/app/Filament/Resources/ProductionPlanResource.php +++ b/app/Filament/Resources/ProductionPlanResource.php @@ -170,6 +170,22 @@ class ProductionPlanResource extends Resource $set('ppLineError', 'Production plan already updated.'); return; } + else + { + $shiftId = \App\Models\Shift::where('id', $get('shift_id')) + ->first(); + + if($shiftId->start_time > $shiftId->end_time) + { + $set('ppLineError', 'End time goes tomorrow...'); + return; + } + else + { + $set('ppLineError', 'End time is within today...'); + return; + } + } } $set('ppLineError', null); }