mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
unruly controller benutzerrechte; studstatus unruly api fix;
This commit is contained in:
@@ -25,7 +25,7 @@ class UnrulyPerson extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'updatePersonUnrulyStatus' => 'basis/mitarbeiter:rw'
|
||||
'updatePersonUnrulyStatus' => array('basis/mitarbeiter:rw', 'student/antragfreigabe:rw', 'student/anrechnung:rw' , 'student/studierendenantrag:rw')
|
||||
]);
|
||||
|
||||
$this->_ci =& get_instance();
|
||||
|
||||
@@ -37,9 +37,6 @@ export default {
|
||||
return this.$p.t('studierendenantrag/info_' + this.antragType + '_' + this.status);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log(this)
|
||||
},
|
||||
template: `
|
||||
<div class="studierendenantrag-antrag card">
|
||||
<div class="card-header">
|
||||
|
||||
@@ -77,16 +77,6 @@ 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 += "";
|
||||
@@ -155,9 +145,6 @@ export default {
|
||||
created() {
|
||||
this.uuid = _uuid++;
|
||||
},
|
||||
mounted() {
|
||||
console.log(this)
|
||||
},
|
||||
template: `
|
||||
<div class="studierendenantrag-form-abmeldung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
|
||||
@@ -79,6 +79,16 @@ export default {
|
||||
this.formData.grund
|
||||
)
|
||||
.then(result => {
|
||||
|
||||
if(this.unrulyInternal) {
|
||||
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 += "";
|
||||
|
||||
@@ -113,6 +123,11 @@ export default {
|
||||
created() {
|
||||
this.uuid = _uuid++;
|
||||
},
|
||||
watch: {
|
||||
'formData.grund'(newVal) {
|
||||
this.unrulyInternal = (newVal === this.$p.t('studierendenantrag', 'mark_person_as_unruly'))
|
||||
}
|
||||
},
|
||||
template: `
|
||||
<div class="studierendenantrag-form-abmeldung">
|
||||
<core-fetch-cmpt :api-function="load">
|
||||
|
||||
Reference in New Issue
Block a user