Enable setting autohold and address validation in web UI
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 41s
Create Docker Image / Build Docker Image (arm64) (push) Successful in 1m47s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-05-05 00:10:55 +10:00
parent 92f964f572
commit 5389739920
4 changed files with 133 additions and 1 deletions

View File

@@ -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()) {