added new features
This commit is contained in:
@@ -111,6 +111,7 @@ class ConstructionConsentController extends mfBaseController {
|
||||
|
||||
protected function viewAction() : void {
|
||||
$this->layout()->setTemplate("ConstructionConsent/View");
|
||||
$this->layout()->set("is_admin", $this->me->isAdmin());
|
||||
|
||||
$id = $this->request->id;
|
||||
if(!is_numeric($id) || $id < 1) {
|
||||
@@ -1027,4 +1028,20 @@ class ConstructionConsentController extends mfBaseController {
|
||||
"status_light_green" => getFilteredCount("status_light", "green", $baseFilter)
|
||||
];
|
||||
}
|
||||
|
||||
protected function approveOverrideAction() {
|
||||
$consent_id = $this->request->consent_id;
|
||||
$checked = $this->request->checked;
|
||||
|
||||
$consent = new ConstructionConsent($consent_id);
|
||||
if(!$consent->id) {
|
||||
$this->returnJson(["status" => "error"]);
|
||||
}
|
||||
|
||||
$consent->update(["approve_override" => $checked]);
|
||||
$consent->save();
|
||||
|
||||
$this->returnJson(["status" => "OK"]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user