mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
Notiztab: Phrasen für Form und Tabulator Notiz, Update Actionbuttons
This commit is contained in:
@@ -9,7 +9,11 @@
|
||||
#'filtercomponent' => true,
|
||||
'tabulator5' => true,
|
||||
'tinymce5' => true,
|
||||
'phrases' => [],
|
||||
'phrases' => array(
|
||||
'global',
|
||||
'ui',
|
||||
'notiz',
|
||||
),
|
||||
'customCSSs' => [
|
||||
'public/css/components/vue-datepicker.css',
|
||||
'public/css/components/primevue.css',
|
||||
|
||||
@@ -19,6 +19,7 @@ import FhcStudentenverwaltung from "../components/Stv/Studentenverwaltung.js";
|
||||
import fhcapifactory from "./api/fhcapifactory.js";
|
||||
|
||||
import FhcAlert from "../plugin/FhcAlert.js";
|
||||
import FhcPhrasen from "../plugin/Phrasen.js";
|
||||
|
||||
//import PrimeVue form "../../../../index.ci.php/public/js/components/primevue/config/config.esm.min.js");
|
||||
//const PrimeVue = await import(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/public/js/components/primevue/config/config.esm.min.js").default;
|
||||
@@ -47,5 +48,6 @@ import(FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_route
|
||||
}
|
||||
})
|
||||
.use(FhcAlert)
|
||||
.use(FhcPhrasen)
|
||||
.mount('#main');
|
||||
});
|
||||
|
||||
@@ -4,6 +4,7 @@ import File from '../Form/Upload/File.js';
|
||||
import FormUploadDms from '../Form/Upload/Dms.js';
|
||||
import {CoreRESTClient} from "../../RESTClient";
|
||||
|
||||
|
||||
export default {
|
||||
components: {
|
||||
VueDatePicker,
|
||||
@@ -115,7 +116,6 @@ export default {
|
||||
return this.anhang;
|
||||
},
|
||||
set(value) {
|
||||
//console.log(value);
|
||||
this.$emit('update:anhang', value);
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,6 @@ export default {
|
||||
return CoreRESTClient
|
||||
.get('components/stv/Notiz/getMitarbeiter/' + event.query)
|
||||
.then(result => {
|
||||
//console.log(result);
|
||||
this.filteredMitarbeiter = CoreRESTClient.getData(result.data);
|
||||
});
|
||||
},
|
||||
@@ -195,20 +194,20 @@ export default {
|
||||
|
||||
<div class="row mb-3">
|
||||
<div class="col-sm-7">
|
||||
<p v-if="statusNew" class="fw-bold">Neue Notiz</p>
|
||||
<p v-else class="fw-bold">Notiz bearbeiten</p>
|
||||
<p v-if="statusNew" class="fw-bold"> {{$p.t('notiz','notiz_new')}}</p>
|
||||
<p v-else class="fw-bold">{{$p.t('notiz','notiz_edit')}}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="titel" class="form-label col-sm-2">Titel</label>
|
||||
<label for="titel" class="form-label col-sm-2">{{$p.t('global','titel')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<input type="text" v-model="intTitel" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="text" class="form-label col-sm-2">Text</label>
|
||||
<label for="text" class="form-label col-sm-2">{{$p.t('global','text')}}</label>
|
||||
|
||||
<!-- TinyMce 5 -->
|
||||
<div class="col-sm-7">
|
||||
@@ -221,7 +220,7 @@ export default {
|
||||
<div v-if="showDocument">
|
||||
<div class="row mb-3">
|
||||
|
||||
<label for="text" class="form-label col-sm-2">Dokument</label>
|
||||
<label for="text" class="form-label col-sm-2">{{$p.t('notiz','document')}}</label>
|
||||
<div class="col-sm-7 py-3">
|
||||
<!--Upload Component-->
|
||||
<FormUploadDms ref="upload" id="file" multiple v-model="intAnhang"></FormUploadDms>
|
||||
@@ -234,12 +233,12 @@ export default {
|
||||
<div v-if="showErweitert">
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="bis" class="form-label col-sm-2">VerfasserIn</label>
|
||||
<label for="bis" class="form-label col-sm-2">{{$p.t('notiz','verfasser')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<PvAutoComplete v-model="intVerfasser" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minLength="3"/>
|
||||
</div>
|
||||
|
||||
<label for="von" class="form-label col-sm-1">gültig von</label>
|
||||
<label for="von" class="form-label col-sm-1">{{$p.t('global','gueltigVon')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="von"
|
||||
@@ -253,12 +252,13 @@ export default {
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="bis" class="form-label col-sm-2">BearbeiterIn</label>
|
||||
<label for="bis" class="form-label col-sm-2">{{$p.t('notiz','bearbeiter')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<PvAutoComplete v-model="intBearbeiter" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minLength="3"/>
|
||||
<PvAutoComplete v-model="intBearbeiter" optionLabel="mitarbeiter" :suggestions="filteredMitarbeiter" @complete="search" minlength="3"/>
|
||||
</div>
|
||||
|
||||
<label for="bis" class="form-label col-sm-1">gültig bis</label>
|
||||
|
||||
<label for="bis" class="form-label col-sm-1">{{$p.t('global','gueltigBis')}}</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker
|
||||
id="bis"
|
||||
@@ -268,12 +268,12 @@ export default {
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"></vue-date-picker>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="bis" class="form-label col-sm-2">erledigt</label>
|
||||
<label for="bis" class="form-label col-sm-2">{{$p.t('notiz','erledigt')}}</label>
|
||||
<div class="col-sm-1">
|
||||
<input type="checkbox" v-model="intErledigt">
|
||||
</div>
|
||||
@@ -281,7 +281,7 @@ export default {
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="lastChange" class="form-label col-sm-2 small">letzte Änderung</label>
|
||||
<label for="lastChange" class="form-label col-sm-2 small">{{$p.t('notiz','letzte_aenderung')}}</label>
|
||||
<div class="col-sm-7">
|
||||
<p class="small">{{this.lastChange}}</p>
|
||||
</div>
|
||||
@@ -289,9 +289,6 @@ export default {
|
||||
|
||||
</form>
|
||||
|
||||
<!-- intText: {{intText}}-->
|
||||
|
||||
|
||||
</div>`
|
||||
}
|
||||
|
||||
|
||||
@@ -3,13 +3,6 @@ import {CoreFilterCmpt} from "../../../filter/Filter.js";
|
||||
import Notiz from "../../../Notiz/Notiz.js";
|
||||
import BsModal from "../../../Bootstrap/Modal";
|
||||
|
||||
var editIcon = function (cell, formatterParams) {
|
||||
return "<i class='fa fa-edit'></i>";
|
||||
};
|
||||
var deleteIcon = function (cell, formatterParams) {
|
||||
return "<i class='fa fa-remove text-danger'></i>";
|
||||
};
|
||||
|
||||
export default {
|
||||
components: {
|
||||
CoreRESTClient,
|
||||
@@ -27,8 +20,8 @@ export default {
|
||||
//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: 350},
|
||||
{title: "VerfasserIn", field: "verfasser_uid"},
|
||||
{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},
|
||||
@@ -37,22 +30,37 @@ export default {
|
||||
{title: "Notiz_id", field: "notiz_id", visible: false},
|
||||
{title: "Notizzuordnung_id", field: "notizzuordnung_id", visible: false},
|
||||
{title: "letzte Änderung", field: "lastupdate", visible: false},
|
||||
{
|
||||
formatter: editIcon, cellClick: (e, cell) => {
|
||||
this.actionEditNotiz(cell.getData().notiz_id);
|
||||
//console.log(cell.getRow().getIndex(), cell.getData(), this);
|
||||
}, width: 50, headerSort: false, headerVisible: false
|
||||
},
|
||||
{
|
||||
formatter: deleteIcon, cellClick: (e, cell) => {
|
||||
this.actionDeleteNotiz(cell.getData().notiz_id);
|
||||
{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";
|
||||
|
||||
}, width: 50, headerSort: false, headerVisible: false
|
||||
},
|
||||
let button = document.createElement('button');
|
||||
button.className = 'btn btn-outline-secondary btn-action';
|
||||
button.innerHTML = '<i class="fa fa-edit"></i>';
|
||||
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 = '<i class="fa fa-xmark"></i>';
|
||||
button.addEventListener('click', () =>
|
||||
this.actionDeleteNotiz(cell.getData().notiz_id)
|
||||
);
|
||||
container.append(button);
|
||||
|
||||
return container;
|
||||
},
|
||||
frozen: true
|
||||
}
|
||||
],
|
||||
|
||||
layout: 'fitDataFill',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '150',
|
||||
height: '250',
|
||||
selectableRangeMode: 'click',
|
||||
selectable: true,
|
||||
index: 'notiz_id',
|
||||
@@ -82,8 +90,7 @@ export default {
|
||||
anhang: []
|
||||
},
|
||||
showErweitert: true, //show details verfasser, bearbeiter, von, bis, erledigt
|
||||
showDocument: true //show upload documents
|
||||
|
||||
showDocument: true, //show upload documents
|
||||
};
|
||||
},
|
||||
methods:{
|
||||
@@ -113,7 +120,6 @@ export default {
|
||||
if(this.notizen.dms_id){
|
||||
console.log("loadEntries with " + this.notizen.notiz_id);
|
||||
this.loadDocEntries(this.notizen.notiz_id);
|
||||
//console.log(this.formData.anhang);
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -271,7 +277,41 @@ export default {
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
computed: { },
|
||||
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: `
|
||||
<div class="stv-details-details h-100 pb-3">
|
||||
|
||||
@@ -321,9 +361,9 @@ export default {
|
||||
>
|
||||
</Notiz>
|
||||
|
||||
<button v-if="formData.statusNew" type="button" class="btn btn-primary" @click="addNewNotiz()"> Neu anlegen </button>
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateNotiz(notizen.notiz_id)"> Speichern </button>
|
||||
|
||||
<button v-if="formData.statusNew" type="button" class="btn btn-primary" @click="addNewNotiz()"> {{$p.t('studierendenantrag', 'btn_new')}}</button>
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateNotiz(notizen.notiz_id)"> {{$p.t('ui', 'speichern')}}</button>
|
||||
|
||||
</div>
|
||||
`
|
||||
};
|
||||
|
||||
@@ -21782,6 +21782,139 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'document',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anhänge',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Attachments',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'notiz_new',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Neue Notiz',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'New Note',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'notiz_edit',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Notiz bearbeiten',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Edit Note',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'verfasser',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Verfasser*in',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'author',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'bearbeiter',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Bearbeiter*in',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'editor',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'erledigt',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'erledigt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'completed',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'notiz',
|
||||
'phrase' => 'letzte_aenderung',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'letzte Änderung',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Last updated',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user