ID column added to run update func in Production Plan Resource

This commit is contained in:
dhanabalan
2025-03-31 21:25:04 +05:30
parent d107f1be18
commit 1ebada1787

View File

@@ -154,6 +154,10 @@ class ProductionPlanResource extends Resource
// $currentPath = url()->current();
// $currentPath = $_SERVER['REQUEST_URI'];
// dd($currentPath);
$isUpdate = !empty($get('id'));
if (!$isUpdate)
{
$exists = ProductionPlan::where('plant_id', $get('plant_id'))
->where('shift_id', $get('shift_id'))
->where('line_id', $get('line_id'))
@@ -166,6 +170,7 @@ class ProductionPlanResource extends Resource
$set('ppLineError', 'Production plan already updated.');
return;
}
}
$set('ppLineError', null);
}
})
@@ -203,6 +208,9 @@ class ProductionPlanResource extends Resource
->label('Production Quantity')
->readOnly()
->default(0),
Forms\Components\TextInput::make('id')
->hidden()
->readOnly(),
])
->columns(2),
]);