1
0
forked from poc/pds

Added insulation resistance type for motor testing masters

This commit is contained in:
dhanabalan
2025-06-02 11:48:44 +05:30
parent d99c8f2cb3
commit b74b362622

View File

@@ -94,16 +94,19 @@ class MotorTestingMasterResource extends Resource
// {
// return [];
// }
if ($plantId)
{
return Configuration::where('plant_id', $plantId)
->where('c_name', 'MOTOR_PHASE')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
else
{
return Configuration::where('c_name', 'MOTOR_PHASE')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
@@ -148,12 +151,14 @@ class MotorTestingMasterResource extends Resource
{
return Configuration::where('plant_id', $plantId)
->where('c_name', 'MOTOR_CONNECTION')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
else
{
return Configuration::where('c_name', 'MOTOR_CONNECTION')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
@@ -169,9 +174,28 @@ class MotorTestingMasterResource extends Resource
Forms\Components\TextInput::make('ins_res_limit')
->label('Insulation Resistance Limit')
->required(),
Forms\Components\TextInput::make('ins_res_type')
Forms\Components\Select::make('ins_res_type')
->label('Insulation Resistance Type')
->default('O')
->selectablePlaceholder(false)
->options(function (callable $get) {
$plantId = $get('plant_id');
if ($plantId)
{
return Configuration::where('plant_id', $plantId)
->where('c_name', 'INSULATION_RESISTANCE_TYPE')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
else
{
return Configuration::where('c_name', 'INSULATION_RESISTANCE_TYPE')
->orderBy('created_at')
->pluck('c_value', 'c_value')
->toArray();
}
})
->required(),
Forms\Components\TextInput::make('res_ry_ll')
->label('Resistance RY LL')