mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
Merge branch 'master' into bug-76109/VVW_Details_und_Status_not_Loading
This commit is contained in:
@@ -197,10 +197,6 @@ html.fs_huge {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.tiny-90 div.tox.tox-tinymce {
|
||||
height: 90% !important;
|
||||
}
|
||||
|
||||
/* slim begin */
|
||||
.stv .form-label {
|
||||
margin-bottom: .15rem;
|
||||
|
||||
@@ -17,13 +17,16 @@
|
||||
|
||||
export default {
|
||||
getMessages(params) {
|
||||
let url = 'api/frontend/v1/messages/messages/getMessages'
|
||||
+ '/' + params.id
|
||||
+ '/' + params.type;
|
||||
if(params.size && params.page) {
|
||||
url += '/' + params.size
|
||||
+ '/' + params.page;
|
||||
}
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/messages/messages/getMessages/'
|
||||
+ params.id + '/'
|
||||
+ params.type + '/'
|
||||
+ params.size + '/'
|
||||
+ params.page
|
||||
url: url
|
||||
};
|
||||
},
|
||||
getVorlagen(){
|
||||
|
||||
@@ -38,6 +38,10 @@ export default {
|
||||
};
|
||||
},
|
||||
insert(params) {
|
||||
if(params.betrag)
|
||||
{
|
||||
params.betrag = params.betrag.replace(',', '.');
|
||||
}
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/stv/konto/insert',
|
||||
@@ -52,6 +56,10 @@ export default {
|
||||
};
|
||||
},
|
||||
edit(params) {
|
||||
if(params.betrag)
|
||||
{
|
||||
params.betrag = params.betrag.replace(',', '.');
|
||||
}
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/stv/konto/update',
|
||||
@@ -65,10 +73,14 @@ export default {
|
||||
params: { buchungsnr }
|
||||
};
|
||||
},
|
||||
getBuchungstypen() {
|
||||
getBuchungstypen(studiensemester_kurzbz) {
|
||||
let url = 'api/frontend/v1/stv/konto/getBuchungstypen'
|
||||
if (!!studiensemester_kurzbz)
|
||||
url = url + '/' + encodeURIComponent(studiensemester_kurzbz);
|
||||
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/konto/getBuchungstypen'
|
||||
url: url
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
const vm = this;
|
||||
tinymce.init({
|
||||
target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
|
||||
//height: 800,
|
||||
min_height: 300,
|
||||
//plugins: ['lists'],
|
||||
toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | link',
|
||||
plugins: 'link',
|
||||
@@ -133,6 +133,7 @@ export default {
|
||||
return this.$api
|
||||
.call(ApiMessages.getDataVorlage(vorlage_kurzbz))
|
||||
.then(response => {
|
||||
this.editor.setContent(response.data.text);
|
||||
this.formData.body = response.data.text;
|
||||
this.formData.subject = response.data.subject;
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
@@ -203,24 +204,6 @@ export default {
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
'formData.body': {
|
||||
handler(newVal) {
|
||||
const tinymcsVal = this.editor.getContent();
|
||||
|
||||
if (newVal && tinymcsVal != newVal) {
|
||||
//Inhalt des Editors aktualisieren
|
||||
this.editor.setContent(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
'formData.vorlage_kurzbz': {
|
||||
handler(newVal){
|
||||
if (newVal && newVal != null) {
|
||||
this.formData.subject = newVal;
|
||||
return this.getDataVorlage(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
messageId: {
|
||||
immediate: true,
|
||||
handler: async function (newMessageId) {
|
||||
@@ -231,6 +214,7 @@ export default {
|
||||
this.replyData = result.data;
|
||||
|
||||
if (this.replyData.length > 0) {
|
||||
this.editor.setContent(this.replyData[0].replyBody);
|
||||
this.formData.subject = this.replyData[0].replySubject;
|
||||
this.formData.body = this.replyData[0].replyBody;
|
||||
this.formData.relationmessage_id = newMessageId;
|
||||
@@ -290,19 +274,6 @@ export default {
|
||||
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
//case of reply
|
||||
if(this.messageId) {
|
||||
this.$api
|
||||
.call(ApiMessages.getReplyData(this.messageId))
|
||||
.then(result => {
|
||||
this.replyData = result.data;
|
||||
this.formData.subject = this.replyData[0].replySubject;
|
||||
this.formData.body = this.replyData[0].replyBody;
|
||||
this.formData.relationmessage_id = this.messageId;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
this.initTinyMCE();
|
||||
@@ -342,7 +313,7 @@ export default {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<form-form class="row g-3 mt-2 h-100" ref="formMessage">
|
||||
<form-form class="row g-3 mt-2 align-content-start" ref="formMessage">
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
@@ -367,7 +338,7 @@ export default {
|
||||
</div>
|
||||
|
||||
<!--Tiny MCE-->
|
||||
<div class="row mb-3 h-100 tiny-90">
|
||||
<div class="row mb-3 tiny-90">
|
||||
<form-input
|
||||
ref="editor"
|
||||
:label="$p.t('global','nachricht') + ' *'"
|
||||
|
||||
@@ -62,9 +62,18 @@ export default {
|
||||
const vm = this;
|
||||
tinymce.init({
|
||||
target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
|
||||
//height: 800,
|
||||
min_height: 300,
|
||||
//plugins: ['lists'],
|
||||
toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify',
|
||||
toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | link',
|
||||
plugins: 'link',
|
||||
link_context_toolbar: true,
|
||||
automatic_uploads: true,
|
||||
default_link_target: "_blank",
|
||||
link_title: true,
|
||||
target_list: [
|
||||
{ title: 'New tab', value: '_blank' },
|
||||
{ title: 'Same tab', value: '_self' }
|
||||
],
|
||||
style_formats: [
|
||||
{title: 'Blocks', block: 'div'},
|
||||
{title: 'Paragraph', block: 'p'},
|
||||
@@ -98,7 +107,8 @@ export default {
|
||||
return this.$api
|
||||
.call(ApiMessages.sendMessage(this.typeId, data))
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
|
||||
if(this.openMode == "inSamePage")
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSent'));
|
||||
this.hideTemplate();
|
||||
this.resetForm();
|
||||
this.messageSent = true;
|
||||
@@ -114,19 +124,17 @@ export default {
|
||||
return this.$api
|
||||
.call(ApiMessages.getDataVorlage(vorlage_kurzbz))
|
||||
.then(response => {
|
||||
this.editor.setContent(response.data.text);
|
||||
this.formData.body = response.data.text;
|
||||
this.formData.subject = response.data.subject;
|
||||
}).catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
getPreviewText(){
|
||||
console.log("subj" + this.formData.subject);
|
||||
const data = new FormData();
|
||||
|
||||
data.append('data', JSON.stringify(this.formData.body));
|
||||
data.append('ids', JSON.stringify(this.id));
|
||||
|
||||
console.log("subj" + this.formData.subject);
|
||||
|
||||
return this.$api
|
||||
.call(ApiMessages.getPreviewText(
|
||||
this.typeId, data))
|
||||
@@ -195,6 +203,7 @@ export default {
|
||||
.call(ApiMessages.getReplyData(messageId))
|
||||
.then(result => {
|
||||
this.replyData = result.data;
|
||||
this.editor.setContent(this.replyData[0].replyBody);
|
||||
this.formData.subject = this.replyData[0].replySubject;
|
||||
this.formData.body = this.replyData[0].replyBody;
|
||||
this.formData.relationmessage_id = messageId;
|
||||
@@ -202,27 +211,6 @@ export default {
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'formData.body': {
|
||||
handler(newVal) {
|
||||
const tinymcsVal = this.editor.getContent();
|
||||
|
||||
if (newVal && tinymcsVal != newVal) {
|
||||
//Inhalt des Editors aktualisieren
|
||||
this.editor.setContent(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
'formData.vorlage_kurzbz': {
|
||||
handler(newVal){
|
||||
|
||||
if (newVal && newVal != null) {
|
||||
this.formData.subject = newVal;
|
||||
return this.getDataVorlage(newVal);
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
created(){
|
||||
const missingparamsmsgs = [];
|
||||
if(!this.typeId)
|
||||
@@ -291,17 +279,8 @@ export default {
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
//case of reply
|
||||
if(this.messageId != null) {
|
||||
if(this.messageId) {
|
||||
this.loadReplyData(this.messageId);
|
||||
/* this.$api
|
||||
.call(ApiMessages.getReplyData(this.messageId))
|
||||
.then(result => {
|
||||
this.replyData = result.data;
|
||||
this.formData.subject = this.replyData[0].replySubject;
|
||||
this.formData.body = this.replyData[0].replyBody;
|
||||
this.formData.relationmessage_id = this.messageId;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);*/
|
||||
}
|
||||
|
||||
},
|
||||
@@ -499,10 +478,10 @@ export default {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-6" style="border-right: 1px">
|
||||
You can safely close this window.
|
||||
You can safely close this window/tab.
|
||||
</div>
|
||||
<div class="col-6">
|
||||
Sie können dieses Fenster schließen.
|
||||
Fenster/Reiter kann geschlossen werden!
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,14 @@ export default {
|
||||
buildTreemap(messages) {
|
||||
if (!messages || !messages.data || messages.data.length === 0)
|
||||
{
|
||||
return {data: [], last_page: 0};
|
||||
if(this.tabulatorOptions.pagination)
|
||||
{
|
||||
return {data: [], last_page: 0};
|
||||
}
|
||||
else
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
const last_page = messages.meta.count;
|
||||
@@ -106,7 +113,15 @@ export default {
|
||||
// to avoid endless loop
|
||||
if (iteration > messages.length) break;
|
||||
}
|
||||
return {data: messageNested, last_page: last_page};
|
||||
|
||||
if(this.tabulatorOptions.pagination)
|
||||
{
|
||||
return {data: messageNested, last_page: last_page};
|
||||
}
|
||||
else
|
||||
{
|
||||
return messageNested;
|
||||
}
|
||||
},
|
||||
loadAjaxCall(url, config, params){
|
||||
return this.$api.call(
|
||||
@@ -252,7 +267,7 @@ export default {
|
||||
frozen: true
|
||||
}
|
||||
],
|
||||
pagination: true,
|
||||
pagination: false,
|
||||
paginationMode: "remote",
|
||||
paginationSize: 15,
|
||||
paginationInitialPage: 1,
|
||||
|
||||
@@ -82,14 +82,16 @@ export default {
|
||||
this.$refs.modalMsg.show();
|
||||
}
|
||||
else if (this.openMode == "inSamePage"){
|
||||
console.log("in same Page");
|
||||
this.isVisibleDiv = true;
|
||||
if(messageId)
|
||||
this.$refs.templateNewDivMessage.loadReplyData(messageId);
|
||||
else
|
||||
this.$refs.templateNewDivMessage.resetForm();
|
||||
|
||||
this.$refs.templateNewDivMessage.showTemplate();
|
||||
this.$nextTick(() => {
|
||||
if(messageId)
|
||||
this.$refs.templateNewDivMessage.loadReplyData(messageId);
|
||||
else
|
||||
this.$refs.templateNewDivMessage.resetForm();
|
||||
|
||||
this.$refs.templateNewDivMessage.showTemplate();
|
||||
});
|
||||
}
|
||||
else
|
||||
console.log("no valid openMode");
|
||||
|
||||
@@ -84,6 +84,14 @@ export default {
|
||||
'microcredential_2',
|
||||
'microcredential_3',
|
||||
'microcredential_4',
|
||||
'microdegree_1',
|
||||
'microdegree_2',
|
||||
'microdegree_3',
|
||||
'microdegree_4',
|
||||
'microdegreeabschluss_1',
|
||||
'microdegreeabschluss_2',
|
||||
'microdegreeabschluss_3',
|
||||
'microdegreeabschluss_4',
|
||||
]
|
||||
},
|
||||
documentDropdownObject: {}
|
||||
|
||||
@@ -83,6 +83,8 @@ export default {
|
||||
});
|
||||
},
|
||||
open() {
|
||||
|
||||
this.getBuchungstypen(this.currentSemester);
|
||||
this.data = {
|
||||
buchungstyp_kurzbz: '',
|
||||
betrag: '-0.00',
|
||||
@@ -105,7 +107,7 @@ export default {
|
||||
const text = typ.standardtext || '';
|
||||
const creditpoints = typ.credit_points || '';
|
||||
|
||||
if (!this.data.betrag || this.data.betrag == '-0.00')
|
||||
if (!this.data.betrag || this.data.betrag == '-0.00' || this.data.betrag !== amount)
|
||||
this.data.betrag = amount;
|
||||
|
||||
if (!this.data.buchungstext)
|
||||
@@ -113,7 +115,18 @@ export default {
|
||||
|
||||
if (this.config.showCreditpoints && (this.data.credit_points == '0.00' || this.data.credit_points === null))
|
||||
this.data.credit_points = creditpoints;
|
||||
}
|
||||
},
|
||||
getBuchungstypen(studiensemester_kurzbz)
|
||||
{
|
||||
this.$api
|
||||
.call(ApiKonto.getBuchungstypen(studiensemester_kurzbz))
|
||||
.then(result => {
|
||||
this.lists.buchungstypen = result.data;
|
||||
if (this.data.buchungstyp_kurzbz)
|
||||
this.checkDefaultBetrag(this.data.buchungstyp_kurzbz);
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<core-form ref="form" class="stv-details-konto-edit" @submit.prevent="save">
|
||||
@@ -166,6 +179,7 @@ export default {
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="data.studiensemester_kurzbz"
|
||||
@change="getBuchungstypen(data.studiensemester_kurzbz)"
|
||||
name="studiensemester_kurzbz"
|
||||
:label="$p.t('lehre/studiensemester')"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user