From a383aa00ed7370f4d5b25f57b89429c96747a8f3 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Mon, 31 Mar 2025 22:08:31 +0530 Subject: [PATCH] Shift hidden id column added to update --- .../Resources/ProductionPlanResource.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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); }