Update validation functionality for phase and connection conflicts
This commit is contained in:
@@ -108,6 +108,12 @@ class MotorTestingMasterResource extends Resource
|
||||
}
|
||||
})
|
||||
->selectablePlaceholder(false)
|
||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||
|
||||
if ($state == 'Single' && $get('connection') == 'Star-Delta') {
|
||||
$set('phase', 'Three');
|
||||
}
|
||||
})
|
||||
->default('Single')
|
||||
->required()
|
||||
->reactive(),
|
||||
@@ -151,6 +157,11 @@ class MotorTestingMasterResource extends Resource
|
||||
->toArray();
|
||||
}
|
||||
})
|
||||
->afterStateUpdated(function ($state, callable $set) {
|
||||
if ($state == 'Star-Delta') {
|
||||
$set('phase', 'Three');
|
||||
}
|
||||
})
|
||||
->required()
|
||||
->default('Star')
|
||||
->reactive(),
|
||||
|
||||
Reference in New Issue
Block a user