added new file upload and bug fix

This commit is contained in:
Luca Haid
2025-06-18 14:51:51 +02:00
parent 2167ed1310
commit 2357a43911
5 changed files with 105 additions and 1 deletions
@@ -646,6 +646,15 @@ FROM ConstructionConsent
}
}
if(array_key_exists("deferred", $filter)) {
$approve_override = $filter["deferred"];
if($approve_override == "!NULL") {
$where .= " AND (deferred IS NOT NULL AND deferred != 0)";
} elseif($approve_override == "NULL") {
$where .= " AND (deferred IS NULL OR deferred = 0)";
}
}
if(array_key_exists("conduit_installed_ftu", $filter)) {
$conduit_installed_ftu = $filter["conduit_installed_ftu"];
if($conduit_installed_ftu == "!NULL") {
@@ -1078,6 +1078,21 @@ class ConstructionConsentController extends mfBaseController {
}
protected function deferAction() {
$consent_id = $this->request->consent_id;
$checked = $this->request->checked;
$consent = new ConstructionConsent($consent_id);
if(!$consent->id) {
$this->returnJson(["status" => "error"]);
}
$consent->update(["deferred" => $checked]);
$consent->save();
$this->returnJson(["status" => "OK"]);
}
protected function prioritizeAction() {
$consent_id = $this->request->consent_id;
$checked = $this->request->checked;