diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index 935928c81..2fb436384 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -63,12 +63,12 @@ class Config extends FHCAPI_Controller 'config' => $config['details'] ]; - $showSuffix = $config['notes']['showCountNotes'] ?? false; $result['notes'] = [ 'title' => $this->p->t('stv', 'tab_notes'), 'component' => './Stv/Studentenverwaltung/Details/Notizen.js', 'config' => $config['notes'], - 'showSuffix' => $showSuffix && ($config['notes']['showCountNotes'] ?? false) + 'showSuffix' => ($config['notes']['showCountNotes'] ?? false), + 'suffixhelper' => APP_ROOT . 'public/js/helpers/Stv/Studentenverwaltung/Details/Notizen/NotizenSuffixHelper.js' ]; $result['contact'] = [ diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/Notiz.js index ab4230681..58168fbc7 100644 --- a/public/js/components/Notiz/Notiz.js +++ b/public/js/components/Notiz/Notiz.js @@ -295,8 +295,7 @@ export default { showType_id: false, showId: false, showLastupdate: false - }, - newCount: null + } } }, methods: { @@ -368,7 +367,6 @@ export default { .catch(this.$fhcAlert.handleSystemError) .finally(() => { window.scrollTo(0, 0); - this.getCountNotes(); }); }, deleteNotiz(notiz_id) { @@ -383,7 +381,6 @@ export default { .catch(this.$fhcAlert.handleSystemError) .finally(() => { window.scrollTo(0, 0); - this.getCountNotes(); }); }, loadNotiz(notiz_id) { @@ -427,7 +424,6 @@ export default { .catch(this.$fhcAlert.handleSystemError) .finally(() => { window.scrollTo(0, 0); - this.getCountNotes(); }); }, reload() { @@ -505,18 +501,6 @@ export default { const columnToShow = "show" + column.charAt(0).toUpperCase() + column.slice(1); this.showVariables[columnToShow] = true; }); - }, - getCountNotes(){ - return this.$api - .call(this.endpoint.getCountNotes(this.id)) - .then( - result => { - this.newCount = result.data; - this.$nextTick(() => { - this.$emit('updateCount', this.newCount); - }); - }) - .catch(this.$fhcAlert.handleSystemError); } }, created() { @@ -527,9 +511,6 @@ export default { if (this.showTinyMce) { await this.initTinyMCE(); } - this.$nextTick(() => { - this.getCountNotes(); - }); }, watch: { //watcher für Tinymce-Textfeld diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js b/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js index 6d7033012..ea6776dce 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js @@ -16,12 +16,6 @@ export default { countNotiz: '' }; }, - methods: { - updateCountNotes(countNew){ - this.headerSuffix = "(" + countNew + ")"; - this.$emit('update:suffix', this.headerSuffix); - } - }, template: `