mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Merge branch 'feature-27351/Digitalisierung_Formulare_Neu' into feature-25999/C4
This commit is contained in:
@@ -190,8 +190,9 @@ class Leitung extends FHC_Controller
|
||||
}
|
||||
|
||||
$studierendenantrag_id = $this->input->post('studierendenantrag_id');
|
||||
$grund = $this->input->post('grund');
|
||||
|
||||
$result = $this->antraglib->denyObjectionAbmeldung($studierendenantrag_id, getAuthUID());
|
||||
$result = $this->antraglib->denyObjectionAbmeldung($studierendenantrag_id, getAuthUID(), $grund);
|
||||
|
||||
if (isError($result))
|
||||
return $this->outputJsonError(['studierendenantrag_id' => getError($result)]);
|
||||
|
||||
@@ -259,7 +259,6 @@ class AntragLib
|
||||
*/
|
||||
public function denyObjectionAbmeldung($studierendenantrag_id, $insertvon, $grund = null)
|
||||
{
|
||||
// TODO(chris): grund?
|
||||
$result = $this->_ci->StudierendenantragModel->load($studierendenantrag_id);
|
||||
if (isError($result))
|
||||
{
|
||||
@@ -282,6 +281,9 @@ class AntragLib
|
||||
|
||||
$status = current(getData($result));
|
||||
|
||||
if ($grund)
|
||||
$grund = $this->_ci->p->t('studierendenantrag', 'mail_part_grund', ['grund' => $grund]);
|
||||
|
||||
$result = $this->_ci->StudierendenantragstatusModel->insert([
|
||||
'studierendenantrag_id' => $studierendenantrag_id,
|
||||
'studierendenantrag_statustyp_kurzbz' => Studierendenantragstatus_model::STATUS_OBJECTION_DENIED,
|
||||
@@ -1625,8 +1627,7 @@ class AntragLib
|
||||
if ($antrag->typ != Studierendenantrag_model::TYP_ABMELDUNG_STGL)
|
||||
return $this->isOwnAntrag($antrag_id);
|
||||
|
||||
// TODO(chris): assistenz can not cancel - should they be able to?
|
||||
return false;
|
||||
return $this->hasAccessToAntrag($antrag_id, 'student/studierendenantrag');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -123,30 +123,30 @@ export default {
|
||||
},
|
||||
actionReject(evt, gruende) {
|
||||
var antraege = evt || this.selectedData;
|
||||
if(!gruende)
|
||||
{
|
||||
if (!gruende)
|
||||
gruende = [];
|
||||
}
|
||||
var currentAntrag = antraege.pop();
|
||||
if(currentAntrag)
|
||||
GrundPopup.popup(this.p.t('studierendenantrag', 'title_grund', {id: currentAntrag.studierendenantrag_id})).then(result =>
|
||||
{
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
if(result[1])
|
||||
{
|
||||
while (antraege.length)
|
||||
if (currentAntrag) {
|
||||
GrundPopup
|
||||
.popup(this.p.t('studierendenantrag', 'title_grund', {id: currentAntrag.studierendenantrag_id}), {
|
||||
countRemaining: antraege.length
|
||||
})
|
||||
.then(result => {
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
if (result[1])
|
||||
{
|
||||
currentAntrag = antraege.pop();
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
while (antraege.length)
|
||||
{
|
||||
currentAntrag = antraege.pop();
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.actionReject(antraege, gruende);
|
||||
})
|
||||
.catch(() => {});
|
||||
else
|
||||
{
|
||||
this.actionReject(antraege, gruende);
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
@@ -206,22 +206,47 @@ export default {
|
||||
},
|
||||
actionoObjectionDeny(evt, gruende) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/objectionDeny/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id
|
||||
if (!gruende)
|
||||
gruende = [];
|
||||
var currentAntrag = antraege.pop();
|
||||
if (currentAntrag) {
|
||||
GrundPopup
|
||||
.popup(this.p.t('studierendenantrag', 'title_grund', {id: currentAntrag.studierendenantrag_id}), {
|
||||
countRemaining : antraege.length,
|
||||
optional: true
|
||||
})
|
||||
.then(result => {
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
if (result[1]) {
|
||||
while (antraege.length) {
|
||||
currentAntrag = antraege.pop();
|
||||
currentAntrag.grund = result[0];
|
||||
gruende.push(currentAntrag);
|
||||
}
|
||||
}
|
||||
this.actionoObjectionDeny(antraege, gruende);
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
gruende.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Leitung/objectionDeny/',
|
||||
{
|
||||
studierendenantrag_id: antrag.studierendenantrag_id,
|
||||
grund: antrag.grund
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
}
|
||||
},
|
||||
actionObjectionApprove(evt, gruende) {
|
||||
var antraege = evt || this.selectedData;
|
||||
@@ -242,6 +267,25 @@ export default {
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
},
|
||||
actionCancel(evt) {
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
axios
|
||||
.all(
|
||||
antraege.map(
|
||||
antrag => axios.post(
|
||||
FHC_JS_DATA_STORAGE_OBJECT.app_root +
|
||||
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
|
||||
'/components/Antrag/Abmeldung/cancelAntrag/',
|
||||
{
|
||||
antrag_id: antrag.studierendenantrag_id
|
||||
}
|
||||
)
|
||||
)
|
||||
)
|
||||
.then(this.showValidation)
|
||||
.catch(this.showError);
|
||||
},
|
||||
showValidation(results) {
|
||||
var errors = results.filter(res => res.data.error);
|
||||
this.$refs.loader.hide();
|
||||
@@ -302,6 +346,7 @@ export default {
|
||||
@action:object="actionObject"
|
||||
@action:objectionDeny="actionoObjectionDeny"
|
||||
@action:objectionApprove="actionObjectionApprove"
|
||||
@action:cancel="actionCancel"
|
||||
>
|
||||
</leitung-table>
|
||||
|
||||
|
||||
@@ -9,7 +9,9 @@ export default {
|
||||
],
|
||||
props: {
|
||||
placeholder: String,
|
||||
default: String
|
||||
default: String,
|
||||
countRemaining: Number,
|
||||
optional: Boolean
|
||||
},
|
||||
data: () => ({
|
||||
value: '',
|
||||
@@ -18,15 +20,13 @@ export default {
|
||||
isInvalid: false
|
||||
}),
|
||||
methods: {
|
||||
submit(){
|
||||
if(!this.value) {
|
||||
submit() {
|
||||
if (!this.value && !this.optional) {
|
||||
this.isInvalid = true;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.result = [this.value, this.check];
|
||||
this.hide();
|
||||
}
|
||||
return
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -49,12 +49,12 @@ export default {
|
||||
{{p.t('kvp','new.error.required')}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-check">
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<div v-if="countRemaining > 0" class="form-check flex-grow-1">
|
||||
<input ref="check" type="checkbox" class="form-check-input" id="cbid" v-model="check">
|
||||
<label class="form-check-label" for="cbid">{{p.t('studierendenantrag','fuer_alle_uebernehmen')}}</label>
|
||||
</div>
|
||||
</template>
|
||||
<template v-slot:footer>
|
||||
<button type="button" class="btn btn-primary" @click="submit">{{p.t('ui','ok')}}</button>
|
||||
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{p.t('ui','cancel')}}</button>
|
||||
</template>
|
||||
|
||||
@@ -25,7 +25,8 @@ export default {
|
||||
'action:reopen',
|
||||
'action:object',
|
||||
'action:objectionDeny',
|
||||
'action:objectionApprove'
|
||||
'action:objectionApprove',
|
||||
'action:cancel'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
@@ -272,6 +273,14 @@ export default {
|
||||
};
|
||||
container.append(button);
|
||||
}
|
||||
// NOTE(chris): Cancel
|
||||
if (data.typ == 'AbmeldungStgl' && data.status == 'Erstellt') {
|
||||
let button = document.createElement('button');
|
||||
button.innerHTML = this.p.t('studierendenantrag', 'btn_cancel');
|
||||
button.className = "btn btn-outline-secondary";
|
||||
button.addEventListener('click',() => this.$emit('action:cancel', [cell.getData()]));
|
||||
container.append(button);
|
||||
}
|
||||
}
|
||||
|
||||
if (this.stgL.includes(data.studiengang_kz)) {
|
||||
|
||||
@@ -18,7 +18,7 @@ export default {
|
||||
isloading: false,
|
||||
statusCode: '',
|
||||
statusMsg: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
lvs1() {
|
||||
|
||||
@@ -21247,6 +21247,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'studierendenantrag',
|
||||
'phrase' => 'mail_part_grund',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => '<h4>Grund:</h4><p>{grund}</p>',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => '<h4>Reason:</h4><p>{grund}</p>',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'studierendenantrag',
|
||||
|
||||
Reference in New Issue
Block a user