From 888e3878bdb714188902449a4bd14f20c479d005 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 9 Sep 2024 17:16:05 +0200 Subject: [PATCH] studstatus unruly als grund --- .../components/Studierendenantrag/Antrag.js | 3 +++ .../Studierendenantrag/Form/Abmeldung.js | 16 ++++++++++++++- .../Studierendenantrag/Form/AbmeldungStgl.js | 15 ++------------ system/phrasesupdate.php | 20 +++++++++++++++++++ 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/public/js/components/Studierendenantrag/Antrag.js b/public/js/components/Studierendenantrag/Antrag.js index 37de9314d..29ed40592 100644 --- a/public/js/components/Studierendenantrag/Antrag.js +++ b/public/js/components/Studierendenantrag/Antrag.js @@ -37,6 +37,9 @@ export default { return this.$p.t('studierendenantrag/info_' + this.antragType + '_' + this.status); } }, + mounted() { + console.log(this) + }, template: `
diff --git a/public/js/components/Studierendenantrag/Form/Abmeldung.js b/public/js/components/Studierendenantrag/Form/Abmeldung.js index 1660957c5..ab75c7a53 100644 --- a/public/js/components/Studierendenantrag/Form/Abmeldung.js +++ b/public/js/components/Studierendenantrag/Form/Abmeldung.js @@ -77,6 +77,17 @@ export default { this.formData.grund ) .then(result => { + console.log(this.formData.grund) + // TODO: replace this with actual identifier after demo porpuses + if(this.formData.grund === '<< PHRASE textLong_unruly>>') { + this.$fhcApi.factory.unrulyperson.updatePersonUnrulyStatus(this.data.person_id, true).then( + (res)=> { + if(res?.meta?.status === "success") { + this.$fhcAlert.alertSuccess(this.$p.t('studierendenantrag', 'antrag_unruly_updated')) + } + }) + } + if (result.data === true) document.location += ""; @@ -144,6 +155,9 @@ export default { created() { this.uuid = _uuid++; }, + mounted() { + console.log(this) + }, template: `
@@ -259,4 +273,4 @@ export default {
` -} +} \ No newline at end of file diff --git a/public/js/components/Studierendenantrag/Form/AbmeldungStgl.js b/public/js/components/Studierendenantrag/Form/AbmeldungStgl.js index f7daa8d23..16cf187b4 100644 --- a/public/js/components/Studierendenantrag/Form/AbmeldungStgl.js +++ b/public/js/components/Studierendenantrag/Form/AbmeldungStgl.js @@ -108,14 +108,6 @@ export default { this.formData.grund = event.target.value ? this.$p.t('studierendenantrag', event.target.value) : ''; - }, - saveUnrulyPerson(event) { - this.$fhcApi.factory.unrulyperson.updatePersonUnrulyStatus(this.data.person_id, this.unrulyInternal).then( - (res)=> { - if(res?.meta?.status === "success") { - this.$fhcAlert.alertSuccess(this.$p.t('studierendenantrag', 'antrag_unruly_updated')) - } - }) } }, created() { @@ -182,6 +174,8 @@ export default { +
@@ -197,11 +191,6 @@ export default {
-
- - -
-