From 2fcbbcac840c6cfd35a98d504bc74e7b5b3d749e Mon Sep 17 00:00:00 2001 From: ma0068 Date: Fri, 2 Feb 2024 15:10:46 +0100 Subject: [PATCH] refactor NotizComponent --- .../controllers/components/stv/Notiz.php | 13 +- public/js/components/Notiz/NotizComponent.js | 526 ++++++++++++++++++ .../Notiz/{Notiz.js => NotizForm.js} | 1 + .../Studentenverwaltung/Details/Notizen.js | 361 +----------- 4 files changed, 544 insertions(+), 357 deletions(-) create mode 100644 public/js/components/Notiz/NotizComponent.js rename public/js/components/Notiz/{Notiz.js => NotizForm.js} (99%) diff --git a/application/controllers/components/stv/Notiz.php b/application/controllers/components/stv/Notiz.php index f370e8abe..ddf10b8a9 100644 --- a/application/controllers/components/stv/Notiz.php +++ b/application/controllers/components/stv/Notiz.php @@ -127,11 +127,11 @@ class Notiz extends FHC_Controller $titel = $this->input->post('titel'); $text = $this->input->post('text'); $erledigt = $this->input->post('erledigt'); - $verfasser_uid = isset($_POST['verfasser_uid']) ? $_POST['verfasser_uid'] : $uid; + $verfasser_uid = isset($_POST['verfasser']) ? $_POST['verfasser'] : $uid; $bearbeiter_uid = isset($_POST['bearbeiter']) ? $_POST['bearbeiter'] : null; $type = $this->input->post('typeId'); - $start = $this->input->post('von'); - $ende = $this->input->post('bis'); + $start = $this->input->post('Von'); + $ende = $this->input->post('Bis'); //Speichern der Notiz und Notizzuordnung inkl Prüfung ob valid type $result = $this->NotizModel->addNotizForType($type, $id, $titel, $text, $uid, $start, $ende, $erledigt, $verfasser_uid, $bearbeiter_uid); @@ -220,12 +220,12 @@ class Notiz extends FHC_Controller $uid = getAuthUID(); $titel = $this->input->post('titel'); $text = $this->input->post('text'); - $verfasser_uid = isset($_POST['verfasser_uid']) ? $_POST['verfasser_uid'] : null; + $verfasser_uid = $this->input->post('verfasser'); $bearbeiter_uid = isset($_POST['bearbeiter']) ? $_POST['bearbeiter'] : $uid; $erledigt = $this->input->post('erledigt'); //$type = $this->input->post('typeId'); //soll auch dieser geändert werden können? - $start = $this->input->post('von'); - $ende = $this->input->post('bis'); + $start = $this->input->post('Von'); + $ende = $this->input->post('Bis'); $result = $this->NotizModel->update( [ @@ -252,6 +252,7 @@ class Notiz extends FHC_Controller //update(1) laden aller bereits mit dieser notiz_id verknüpften DMS-Einträge $this->load->model('person/Notizdokument_model', 'NotizdokumentModel'); $this->NotizdokumentModel->addJoin('campus.tbl_dms_version', 'dms_id'); + $dms_uploaded = null; $result = $this->NotizdokumentModel->loadWhere(array('notiz_id' => $notiz_id)); if (isError($result)) diff --git a/public/js/components/Notiz/NotizComponent.js b/public/js/components/Notiz/NotizComponent.js new file mode 100644 index 000000000..5f7ea9993 --- /dev/null +++ b/public/js/components/Notiz/NotizComponent.js @@ -0,0 +1,526 @@ +import VueDatePicker from '../vueDatepicker.js.php'; +import PvAutoComplete from "../../../../index.ci.php/public/js/components/primevue/autocomplete/autocomplete.esm.min.js"; +import FormUploadDms from '../Form/Upload/Dms.js'; +import {CoreRESTClient} from "../../RESTClient"; +import {CoreFilterCmpt} from "../filter/Filter.js"; +import BsModal from "../Bootstrap/Modal"; + + +export default { + components: { + CoreFilterCmpt, + VueDatePicker, + PvAutoComplete, + FormUploadDms, + BsModal + }, + props: [ + 'typeId', + 'id', + 'showErweitert', + 'showDocument' + ], + data(){ + return { + tabulatorOptions: { + ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Notiz/getNotizen/' + this.id + '/' + this.typeId), + columns: [ + {title: "Titel", field: "titel"}, + {title: "Text", field: "text_stripped", width: 250}, + {title: "VerfasserIn", field: "verfasser_uid"}, + {title: "BearbeiterIn", field: "bearbeiter_uid", visible: false}, + {title: "Start", field: "start", visible: false}, + {title: "Ende", field: "ende", visible: false}, + {title: "Dokumente", field: "countdoc"}, + {title: "Erledigt", field: "erledigt", visible: false}, + {title: "Notiz_id", field: "notiz_id", visible: false}, + {title: "Notizzuordnung_id", field: "notizzuordnung_id", visible: false}, + {title: "letzte Änderung", field: "lastupdate", visible: false}, + {title: 'Aktionen', field: 'actions', + minWidth: 150, // Ensures Action-buttons will be always fully displayed + formatter: (cell, formatterParams, onRendered) => { + let container = document.createElement('div'); + container.className = "d-flex gap-2"; + + let button = document.createElement('button'); + button.className = 'btn btn-outline-secondary btn-action'; + button.innerHTML = ''; + button.addEventListener('click', (event) => + this.actionEditNotiz(cell.getData().notiz_id) + ); + container.append(button); + + button = document.createElement('button'); + button.className = 'btn btn-outline-secondary btn-action'; + button.innerHTML = ''; + button.addEventListener('click', () => + this.actionDeleteNotiz(cell.getData().notiz_id) + ); + container.append(button); + + return container; + }, + frozen: true + } + ], + layout: 'fitDataFill', + layoutColumnsOnNewData: false, + height: '250', + selectableRangeMode: 'click', + selectable: true, + index: 'notiz_id' + }, + tabulatorEvents: [], + notizen: [], + multiupload: true, + mitarbeiter: [], + filteredMitarbeiter: [], + zwischenvar: '', + editorInitialized: false, + editor: null, + notizData: { + typeId: this.typeId, + titel: null, + statusNew: true, + text: null, + lastChange: null, + von: null, + bis: null, + document: null, + erledigt: false, + verfasser: null, + bearbeiter: null, + anhang: [] + }, + }; + }, + methods: { + actionDeleteNotiz(notiz_id){ + this.loadNotiz(notiz_id).then(() => { + if(this.notizen.notiz_id) { + this.$refs.deleteNotizModal.show(); + } + }); + }, + actionEditNotiz(notiz_id){ + this.loadNotiz(notiz_id).then(() => { + console.log(this.notizen); + if(this.notizen.notiz_id) { + this.notizData.titel = this.notizen.titel; + this.notizData.statusNew = false; + this.notizData.text = this.notizen.text; + this.notizData.lastChange = this.notizen.lastupdate; + this.notizData.von = this.notizen.start; + this.notizData.bis = this.notizen.ende; + this.notizData.document = this.notizen.dms_id; + this.notizData.erledigt = this.notizen.erledigt; + this.notizData.verfasser = this.notizen.verfasser_uid; //todo(manu) better + this.notizData.intVerfasser = this.notizen.verfasser_uid; + this.notizData.intBearbeiter = this.notizen.bearbeiter_uid; //todo(manu) better + this.notizData.bearbeiter = this.notizen.bearbeiter_uid; + } + }) + .then(() => { + if(this.notizen.dms_id){ + console.log("loadEntries with " + this.notizen.notiz_id); + this.loadDocEntries(this.notizen.notiz_id); + } + }); + }, + actionNewNotiz(){ + this.resetFormData(); + }, + addNewNotiz(notizData) { + const formData = new FormData(); + + formData.append('data', JSON.stringify(this.notizData)); + Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v)); + CoreRESTClient.post( + 'components/stv/Notiz/addNewNotiz/' + this.id, + formData, + { Headers: { "Content-Type": "multipart/form-data" } } + ).then(response => { + if (!response.data.error) { + this.$fhcAlert.alertSuccess('Anlegen von neuer Notiz erfolgreich'); + this.resetFormData(); + this.reload(); + } else { + const errorData = response.data.retval; + Object.entries(errorData).forEach(entry => { + const [key, value] = entry; + this.$fhcAlert.alertError(value); + }); + } + }).catch(error => { + if (error.response) { + this.$fhcAlert.alertError(error.response.data); + } + }).finally(() => { + window.scrollTo(0, 0); + }); + }, + deleteNotiz(notiz_id){ + CoreRESTClient.post('components/stv/Notiz/deleteNotiz/' + notiz_id) + .then(response => { + if (!response.data.error) { + this.$fhcAlert.alertSuccess('Löschen erfolgreich'); + this.$refs.deleteNotizModal.hide(); + this.reload(); + } else { + this.$fhcAlert.alertError('Keine Notiz mit Id ' + notiz_id + ' gefunden'); + } + }).catch(error => { + this.$fhcAlert.alertError('Fehler bei Löschroutine aufgetreten'); + }).finally(()=> { + window.scrollTo(0, 0); + }); + }, + loadNotiz(notiz_id){ + return CoreRESTClient.get( + 'components/stv/Notiz/loadNotiz/' + notiz_id) + .then( + result => { + if(result.data.retval) { + this.notizen = result.data.retval; + //console.log(this.notizen); + } + else { + this.notizen = {}; + this.$fhcAlert.alertError('Keine Notiz mit Id ' + notiz_id + ' gefunden'); + } + return result; + } + ); + }, + loadDocEntries(notiz_id){ + return CoreRESTClient.get('components/stv/Notiz/loadDokumente/' + notiz_id) + .then( + result => { + if(result.data.retval) { + this.notizData.anhang = result.data.retval; + console.log(this.notizData.anhang); + } + else + { + this.notizData.anhang = {}; + this.$fhcAlert.alertError('Kein Dokumenteneintrag mit NotizId ' + notiz_id + ' gefunden'); + } + return result; + } + ); + }, + updateNotiz(notiz_id){ + const formData = new FormData(); + formData.append('data', JSON.stringify(this.notizData)); + Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v)); + + CoreRESTClient.post( + 'components/stv/Notiz/updateNotiz/' + notiz_id, + formData, + { Headers: { "Content-Type": "multipart/form-data" } } + ).then(response => { + if (!response.data.error) { + this.$fhcAlert.alertSuccess('Update von Notiz erfolgreich'); + this.resetFormData(); + this.reload(); + } else { + const errorData = response.data.retval; + Object.entries(errorData).forEach(entry => { + const [key, value] = entry; + this.$fhcAlert.alertError(value); + }); + } + }).catch(error => { + this.$fhcAlert.alertError('Fehler bei Updateroutine aufgetreten'); + }).finally(() => { + window.scrollTo(0, 0); + }); + }, + reload(){ + this.$refs.table.reloadTable(); + }, + resetFormData() { + this.$refs.formc.reset(); + this.notizData = { + typeId: this.typeId, + titel: null, + statusNew: true, + text: null, + lastChange: null, + von: null, + bis: null, + document: null, + erledigt: false, + verfasser: this.uid, + bearbeiter: null, + anhang: [] + }; + }, + getUid(){ + CoreRESTClient + .get('components/stv/Notiz/getUid') + .then(result => { + if(result.data.retval) { + this.notizData.intVerfasser = result.data.retval; + } + }) + .catch(this.$fhcAlert.handleSystemError); + }, + search(event) { + return CoreRESTClient + .get('components/stv/Notiz/getMitarbeiter/' + event.query) + .then(result => { + this.filteredMitarbeiter = CoreRESTClient.getData(result.data); + }); + }, +/* initTinyMCE() { + + const vm = this; + tinymce.init({ + target: this.$refs.editor, //Important: not selector: to enable multiple import of component + //height: 800, + //plugins: ['lists'], + //toolbar: " blocks | bold italic underline | alignleft aligncenter alignright alignjustify", + toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify', + style_formats: [ + { title: 'Blocks', block: 'div' }, + { title: 'Paragraph', block: 'p' }, + { title: 'Heading 1', block: 'h1' }, + { title: 'Heading 2', block: 'h2' }, + { title: 'Heading 3', block: 'h3' }, + { title: 'Heading 4', block: 'h4' }, + { title: 'Heading 5', block: 'h5' }, + { title: 'Heading 6', block: 'h6' }, + ], + autoresize_bottom_margin: 16, + + setup: (editor) => { + vm.editor = editor; + + editor.on('input', () => { + const newContent = editor.getContent(); + vm.intText = newContent; + }); + }, + }); + },*/ + }, + created(){ + this.getUid(); + }, + async mounted() { + await this.$p.loadCategory(['notiz','global']); + + let cm = this.$refs.table.tabulator.columnManager; + + cm.getColumnByField('verfasser_uid').component.updateDefinition({ + title: this.$p.t('notiz', 'verfasser') + }); + cm.getColumnByField('titel').component.updateDefinition({ + title: this.$p.t('global', 'titel') + }); + cm.getColumnByField('text_stripped').component.updateDefinition({ + title: this.$p.t('global', 'text') + }); + cm.getColumnByField('bearbeiter_uid').component.updateDefinition({ + title: this.$p.t('notiz', 'bearbeiter') + }); + cm.getColumnByField('start').component.updateDefinition({ + title: this.$p.t('global', 'gueltigVon') + }); + cm.getColumnByField('ende').component.updateDefinition({ + title: this.$p.t('global', 'gueltigBis') + }); + cm.getColumnByField('countdoc').component.updateDefinition({ + title: this.$p.t('notiz', 'document') + }); + cm.getColumnByField('erledigt').component.updateDefinition({ + title: this.$p.t('notiz', 'erledigt') + }); + cm.getColumnByField('lastupdate').component.updateDefinition({ + title: this.$p.t('notiz', 'letzte_aenderung') + }); + }, +/* mounted() { + this.initTinyMCE(); + },*/ +/* watch: { + intText: function(newVal) { + const tinymcsVal = this.editor.getContent(); + + if (tinymcsVal != newVal) { + //Inhalt des Editors aktualisieren + this.editor.setContent(newVal); + } + }, + },*/ + beforeDestroy() { + this.editor.destroy(); + }, + watch: { + //Watcher für autocomplete Bearbeiter und Verfasser + 'notizData.intBearbeiter': { + handler(newVal) { + if(typeof newVal === 'object') { + this.notizData.bearbeiter = newVal.mitarbeiter_uid; + } + }, + deep: true + }, + 'notizData.intVerfasser': { + handler(newVal) { + if(typeof newVal === 'object') { + this.notizData.verfasser = newVal.mitarbeiter_uid; + } + }, + deep: true + } + }, + template: ` +
+ + + + + + + + + + +

+ +
+

+
+
+
+ [{{notizData.typeId}}] +
+
+ +
+
+

{{$p.t('notiz','notiz_new')}}

+

{{$p.t('notiz','notiz_edit')}}

+
+
+ +
+ +
+ +
+
+ +
+ + + + + + +
+ +
+ +
+ + +
+
+ + +
+ + +
+ +
+
+ + +
+ +
+ +
+ +
+ + +
+ +
+
+ +
+ +
+ +
+ + + +
+ +
+ +
+ +
+ +
+ +
+
+ +
+ +
+ +
+

{{notizData.lastChange}}

+
+
+ + + + + + +
` +} + diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/NotizForm.js similarity index 99% rename from public/js/components/Notiz/Notiz.js rename to public/js/components/Notiz/NotizForm.js index 988c6d7ec..b65e2be20 100644 --- a/public/js/components/Notiz/Notiz.js +++ b/public/js/components/Notiz/NotizForm.js @@ -174,6 +174,7 @@ export default { if (tinymcsVal != newVal) { //Inhalt des Editors aktualisieren + //Todo(manu) hier gibts ein problem mit update function this.editor.setContent(newVal); } }, diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js b/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js index 131b4fd55..31a92a9e7 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/Notizen.js @@ -1,369 +1,28 @@ -import {CoreRESTClient} from "../../../../RESTClient.js"; -import {CoreFilterCmpt} from "../../../filter/Filter.js"; -import Notiz from "../../../Notiz/Notiz.js"; -import BsModal from "../../../Bootstrap/Modal"; +import NotizComponent from "../../../Notiz/NotizComponent.js"; export default { components: { - CoreRESTClient, - CoreFilterCmpt, - Notiz, - BsModal + NotizComponent }, props: { modelValue: Object }, data(){ return { - tabulatorOptions: { - ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Notiz/getNotizen/' + this.modelValue.person_id + '/person_id'), - //ajaxURL: CoreRESTClient._generateRouterURI('components/stv/Notiz/getNotizen/' + this.modelValue.person_id + '/' + this.formData.typeId), - columns: [ - {title: "Titel", field: "titel"}, - {title: "Text", field: "text_stripped", width: 250}, - {title: "VerfasserIn", field: "verfasser_uid"}, - {title: "BearbeiterIn", field: "bearbeiter_uid", visible: false}, - {title: "Start", field: "start", visible: false}, - {title: "Ende", field: "ende", visible: false}, - {title: "Dokumente", field: "countdoc"}, - {title: "Erledigt", field: "erledigt", visible: false}, - {title: "Notiz_id", field: "notiz_id", visible: false}, - {title: "Notizzuordnung_id", field: "notizzuordnung_id", visible: false}, - {title: "letzte Änderung", field: "lastupdate", visible: false}, - {title: 'Aktionen', field: 'actions', - minWidth: 150, // Ensures Action-buttons will be always fully displayed - formatter: (cell, formatterParams, onRendered) => { - let container = document.createElement('div'); - container.className = "d-flex gap-2"; - - let button = document.createElement('button'); - button.className = 'btn btn-outline-secondary btn-action'; - button.innerHTML = ''; - button.addEventListener('click', (event) => - this.actionEditNotiz(cell.getData().notiz_id) - ); - container.append(button); - - button = document.createElement('button'); - button.className = 'btn btn-outline-secondary btn-action'; - button.innerHTML = ''; - button.addEventListener('click', () => - this.actionDeleteNotiz(cell.getData().notiz_id) - ); - container.append(button); - - return container; - }, - frozen: true - } - ], - - layout: 'fitDataFill', - layoutColumnsOnNewData: false, - height: '250', - selectableRangeMode: 'click', - selectable: true, - index: 'notiz_id', -/* rowClick: (e, row) => { - const notizId = row.getData().notiz_id; - console.log(notizId); - this.actionEditNotiz(notizId); - },*/ - }, - tabulatorEvents: [], - notizen: [], - uid: '', - intVerfasser: '', - filteredMitarbeiter: [], - formData: { - typeId: 'person_id', - titel: null, - statusNew: true, - text: null, - lastChange: null, - von: null, - bis: null, - document: null, - erledigt: false, - verfasser: this.uid, - bearbeiter: null, - anhang: [] - }, showErweitert: true, //show details verfasser, bearbeiter, von, bis, erledigt showDocument: true, //show upload documents }; }, - methods:{ - actionDeleteNotiz(notiz_id){ - this.loadNotiz(notiz_id).then(() => { - if(this.notizen.notiz_id) { - this.$refs.deleteNotizModal.show(); - } - }); - }, - actionEditNotiz(notiz_id){ - this.loadNotiz(notiz_id).then(() => { - if(this.notizen.notiz_id) { - this.formData.titel = this.notizen.titel; - this.formData.statusNew = false; - this.formData.text = this.notizen.text; - this.formData.lastChange = this.notizen.lastupdate; - this.formData.von = this.notizen.start; - this.formData.bis = this.notizen.ende; - this.formData.document = this.notizen.dms_id; - this.formData.erledigt = this.notizen.erledigt; - this.formData.verfasser = this.notizen.verfasser_uid; - this.formData.bearbeiter = this.notizen.bearbeiter_uid; - } - }) - .then(() => { - if(this.notizen.dms_id){ - console.log("loadEntries with " + this.notizen.notiz_id); - this.loadDocEntries(this.notizen.notiz_id); - } - }); - }, - actionNewNotiz(){ - this.resetFormData(); - this.formData.typeId = 'person_id'; - this.formData.titel = ''; - this.formData.statusNew = true; - this.formData.text = null; - this.formData.lastChange = null; - this.formData.von = null; - this.formData.bis = null; - this.formData.document = null; - this.formData.erledigt = false; - this.formData.verfasser = this.uid; - this.formData.bearbeiter = null; - this.formData.anhang = []; - }, - addNewNotiz(notizData) { - const formData = new FormData(); - - formData.append('data', JSON.stringify(this.formData)); - Object.entries(this.formData.anhang).forEach(([k, v]) => formData.append(k, v)); - CoreRESTClient.post( - 'components/stv/Notiz/addNewNotiz/' + this.modelValue.person_id, - formData, - { Headers: { "Content-Type": "multipart/form-data" } } - ).then(response => { - if (!response.data.error) { - this.$fhcAlert.alertSuccess('Anlegen von neuer Notiz erfolgreich'); - this.resetFormData(); - this.reload(); - } else { - const errorData = response.data.retval; - Object.entries(errorData).forEach(entry => { - const [key, value] = entry; - this.$fhcAlert.alertError(value); - }); - } - }).catch(error => { - if (error.response) { - this.$fhcAlert.alertError(error.response.data); - } - }).finally(() => { - window.scrollTo(0, 0); - }); - }, - deleteNotiz(notiz_id){ - CoreRESTClient.post('components/stv/Notiz/deleteNotiz/' + notiz_id) - .then(response => { - if (!response.data.error) { - this.$fhcAlert.alertSuccess('Löschen erfolgreich'); - this.$refs.deleteNotizModal.hide(); - this.reload(); - } else { - this.$fhcAlert.alertError('Keine Notiz mit Id ' + notiz_id + ' gefunden'); - } - }).catch(error => { - this.$fhcAlert.alertError('Fehler bei Löschroutine aufgetreten'); - }).finally(()=> { - window.scrollTo(0, 0); - }); - }, - loadDocEntries(notiz_id){ - return CoreRESTClient.get('components/stv/Notiz/loadDokumente/' + notiz_id) - .then( - result => { - if(result.data.retval) { - this.formData.anhang = result.data.retval; - console.log(this.formData.anhang); - } - else - { - this.formData.anhang = {}; - this.$fhcAlert.alertError('Kein Dokumenteneintrag mit NotizId ' + notiz_id + ' gefunden'); - } - return result; - } - ); - }, - loadNotiz(notiz_id){ - return CoreRESTClient.get( - 'components/stv/Notiz/loadNotiz/' + notiz_id) - .then( - result => { - if(result.data.retval) { - this.notizen = result.data.retval; - //console.log(this.notizen); - } - else { - this.notizen = {}; - this.$fhcAlert.alertError('Keine Notiz mit Id ' + notiz_id + ' gefunden'); - } - return result; - } - ); - }, - reload(){ - this.$refs.table.reloadTable(); - }, - resetFormData(){ - this.$refs.form.reset(); - this.formData = { - typeId: 'person_id', - titel: null, - statusNew: true, - text: null, - lastChange: null, - von: null, - bis: null, - document: null, - erledigt: false, - verfasser: this.uid, - bearbeiter: null, - anhang: [] - }; - }, - updateNotiz(notiz_id){ - const formData = new FormData(); - - formData.append('data', JSON.stringify(this.formData)); - Object.entries(this.formData.anhang).forEach(([k, v]) => formData.append(k, v)); - //console.log(this.formData); - - CoreRESTClient.post( - 'components/stv/Notiz/updateNotiz/' + notiz_id, - formData, - { Headers: { "Content-Type": "multipart/form-data" } } - ).then(response => { - if (!response.data.error) { - this.$fhcAlert.alertSuccess('Update von Notiz erfolgreich'); - this.resetFormData(); - this.reload(); - } else { - const errorData = response.data.retval; - Object.entries(errorData).forEach(entry => { - const [key, value] = entry; - this.$fhcAlert.alertError(value); - }); - } - }).catch(error => { - this.$fhcAlert.alertError('Fehler bei Updateroutine aufgetreten'); - }).finally(() => { - window.scrollTo(0, 0); - }); - }, - }, - created(){ - CoreRESTClient - .get('components/stv/Notiz/getUid') - .then(result => { - if(result.data.retval) { - this.formData.verfasser = result.data.retval; - } - }) - .catch(this.$fhcAlert.handleSystemError); - }, - async mounted() { - await this.$p.loadCategory(['notiz','global']); - - let cm = this.$refs.table.tabulator.columnManager; - - cm.getColumnByField('verfasser_uid').component.updateDefinition({ - title: this.$p.t('notiz', 'verfasser') - }); - cm.getColumnByField('titel').component.updateDefinition({ - title: this.$p.t('global', 'titel') - }); - cm.getColumnByField('text_stripped').component.updateDefinition({ - title: this.$p.t('global', 'text') - }); - cm.getColumnByField('bearbeiter_uid').component.updateDefinition({ - title: this.$p.t('notiz', 'bearbeiter') - }); - cm.getColumnByField('start').component.updateDefinition({ - title: this.$p.t('global', 'gueltigVon') - }); - cm.getColumnByField('ende').component.updateDefinition({ - title: this.$p.t('global', 'gueltigBis') - }); - cm.getColumnByField('countdoc').component.updateDefinition({ - title: this.$p.t('notiz', 'document') - }); - cm.getColumnByField('erledigt').component.updateDefinition({ - title: this.$p.t('notiz', 'erledigt') - }); - cm.getColumnByField('lastupdate').component.updateDefinition({ - title: this.$p.t('notiz', 'letzte_aenderung') - }); - }, -/* computed: { - },*/ template: `
- - - - - - - - - - - -
-
- - - - - - + +
` };