diff --git a/application/controllers/components/stv/Notiz.php b/application/controllers/components/stv/Notiz.php index 33205a862..439e7c7fb 100644 --- a/application/controllers/components/stv/Notiz.php +++ b/application/controllers/components/stv/Notiz.php @@ -172,6 +172,23 @@ class Notiz extends FHC_Controller return $this->outputJsonSuccess(true); } + public function deleteNotiz ($notiz_id) + { + $this->load->model('person/Notiz_model', 'NotizModel'); + $result = $this->NotizModel->delete( + array('notiz_id' => $notiz_id) + ); + + if (isError($result)) + { + $this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR); + $this->outputJson($result); + } + elseif (!hasData($result)) { + $this->outputJson($result); + } + return $this->outputJsonSuccess(current(getData($result))); + } } \ No newline at end of file diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/Notiz.js index ae3ff8c7a..eb9788516 100644 --- a/public/js/components/Notiz/Notiz.js +++ b/public/js/components/Notiz/Notiz.js @@ -71,7 +71,7 @@ export default { }, template: `