can delete Consent plan file / added empty page in Consentform.pdf
This commit is contained in:
@@ -489,6 +489,9 @@ class ConstructionConsentController extends mfBaseController {
|
||||
case "saveCheckbox":
|
||||
$return = $this->saveCheckboxApi();
|
||||
break;
|
||||
case "deleteRimoPlan":
|
||||
$return = $this->deleteRimoPlanApi();
|
||||
break;
|
||||
default:
|
||||
$this->log->warn(__METHOD__ . ": Called API function '$do' does not exist");
|
||||
$return = false;
|
||||
@@ -889,9 +892,17 @@ class ConstructionConsentController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
private function saveRimoPlanPreviewApi() {
|
||||
$adb_hausnummer_id = $this->request->building_id;
|
||||
$consent_id = $this->request->constructionconsent_id;
|
||||
private function deleteRimoPlanApi() {
|
||||
$consent_id = $this->request->id;
|
||||
|
||||
$consent = new ConstructionConsent($consent_id);
|
||||
if(!$consent->id) return false;
|
||||
|
||||
if($consent->file && $consent->file->file_id) {
|
||||
$consent->file->delete();
|
||||
}
|
||||
|
||||
return ["message" => "Plan deleted successfully"];
|
||||
}
|
||||
|
||||
private function saveCheckboxApi() {
|
||||
|
||||
Reference in New Issue
Block a user