Added insulation resistance type for motor testing masters
This commit is contained in:
@@ -94,16 +94,19 @@ class MotorTestingMasterResource extends Resource
|
|||||||
// {
|
// {
|
||||||
// return [];
|
// return [];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if ($plantId)
|
if ($plantId)
|
||||||
{
|
{
|
||||||
return Configuration::where('plant_id', $plantId)
|
return Configuration::where('plant_id', $plantId)
|
||||||
->where('c_name', 'MOTOR_PHASE')
|
->where('c_name', 'MOTOR_PHASE')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Configuration::where('c_name', 'MOTOR_PHASE')
|
return Configuration::where('c_name', 'MOTOR_PHASE')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
@@ -148,12 +151,14 @@ class MotorTestingMasterResource extends Resource
|
|||||||
{
|
{
|
||||||
return Configuration::where('plant_id', $plantId)
|
return Configuration::where('plant_id', $plantId)
|
||||||
->where('c_name', 'MOTOR_CONNECTION')
|
->where('c_name', 'MOTOR_CONNECTION')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return Configuration::where('c_name', 'MOTOR_CONNECTION')
|
return Configuration::where('c_name', 'MOTOR_CONNECTION')
|
||||||
|
->orderBy('created_at')
|
||||||
->pluck('c_value', 'c_value')
|
->pluck('c_value', 'c_value')
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
@@ -169,9 +174,28 @@ class MotorTestingMasterResource extends Resource
|
|||||||
Forms\Components\TextInput::make('ins_res_limit')
|
Forms\Components\TextInput::make('ins_res_limit')
|
||||||
->label('Insulation Resistance Limit')
|
->label('Insulation Resistance Limit')
|
||||||
->required(),
|
->required(),
|
||||||
Forms\Components\TextInput::make('ins_res_type')
|
Forms\Components\Select::make('ins_res_type')
|
||||||
->label('Insulation Resistance Type')
|
->label('Insulation Resistance Type')
|
||||||
->default('O')
|
->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(),
|
->required(),
|
||||||
Forms\Components\TextInput::make('res_ry_ll')
|
Forms\Components\TextInput::make('res_ry_ll')
|
||||||
->label('Resistance RY LL')
|
->label('Resistance RY LL')
|
||||||
|
|||||||
Reference in New Issue
Block a user