Enable setting autohold and address validation in web UI
This commit is contained in:
@@ -626,6 +626,28 @@ class SystemController extends Controller
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function api_address_validated_toggle(Request $request,string $state): array
|
||||
{
|
||||
$o = Address::findOrFail($request->id);
|
||||
$o->validated = $state === 'off' ? FALSE : TRUE;
|
||||
$o->save();
|
||||
|
||||
Log::debug(sprintf('%s:- Address Validated set to [%s]',self::LOGKEY,$o->autohold ? 'ON' : 'OFF'));
|
||||
|
||||
return ['validated'=>$o->validated];
|
||||
}
|
||||
|
||||
public function api_autohold_toggle(Request $request,string $state): array
|
||||
{
|
||||
$o = System::findOrFail($request->id);
|
||||
$o->autohold = $state === 'off' ? FALSE : TRUE;
|
||||
$o->save();
|
||||
|
||||
Log::debug(sprintf('%s:- Autohold set to [%s]',self::LOGKEY,$o->autohold ? 'ON' : 'OFF'));
|
||||
|
||||
return ['autohold'=>$o->autohold];
|
||||
}
|
||||
|
||||
public function areafix(AreafixRequest $request,System $o,Zone $zo)
|
||||
{
|
||||
if ($request->post()) {
|
||||
|
Reference in New Issue
Block a user