mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
new workflow Terminate of Studierendenantrag
- DB Update for new studierendenantrag_statustyp with studierendenantrag_statustyp_kurzbz = 'Storniert' - new permission student/studierendenantrag - possibility to set status to Terminated in case of new permission
This commit is contained in:
@@ -96,5 +96,12 @@ export default {
|
||||
url: '/api/frontend/v1/studstatus/leitung/denyObjection',
|
||||
params: antrag
|
||||
};
|
||||
}
|
||||
},
|
||||
terminate(antrag) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: '/api/frontend/v1/studstatus/leitung/terminateAntrag',
|
||||
params: antrag
|
||||
};
|
||||
},
|
||||
};
|
||||
@@ -18,7 +18,11 @@ export default {
|
||||
},
|
||||
props: {
|
||||
stgL: Array,
|
||||
stgA: Array
|
||||
stgA: Array,
|
||||
permissionTerminateAntrag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -223,6 +227,13 @@ export default {
|
||||
.then(this.showResults);
|
||||
}
|
||||
},
|
||||
actionTerminate(evt){
|
||||
var antraege = evt || this.selectedData;
|
||||
this.$refs.loader.show();
|
||||
this
|
||||
._singleOrMultiApiCall(antraege, ApiStudstatusLeitung.terminate)
|
||||
.then(this.showResults);
|
||||
},
|
||||
showResults(results) {
|
||||
let fulfilled = results.filter(res => res.status == 'fulfilled');
|
||||
this.$refs.loader.hide();
|
||||
@@ -270,6 +281,7 @@ export default {
|
||||
:stg-a="stgkzA"
|
||||
:stg-l="stgkzL"
|
||||
:filter="filter"
|
||||
:permission-terminate-antrag="permissionTerminateAntrag"
|
||||
v-model:columnData="columns"
|
||||
v-model:selectedData="selectedData"
|
||||
@action:approve="actionApprove"
|
||||
@@ -280,7 +292,8 @@ export default {
|
||||
@action:objectionApprove="actionObjectionApprove"
|
||||
@action:cancel="actionCancel"
|
||||
@action:pause="actionPause"
|
||||
@action:unpause="actionUnpause"
|
||||
@action:unpause="actionUnpause"
|
||||
@action:terminate="actionTerminate"
|
||||
@reload="reload"
|
||||
>
|
||||
</leitung-table>
|
||||
|
||||
@@ -16,7 +16,11 @@ export default {
|
||||
columnData: Array,
|
||||
stgL: Array,
|
||||
stgA: Array,
|
||||
filter: String
|
||||
filter: String,
|
||||
permissionTerminateAntrag: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
emits: [
|
||||
'update:columnData',
|
||||
@@ -29,7 +33,8 @@ export default {
|
||||
'action:objectionApprove',
|
||||
'action:cancel',
|
||||
'action:pause',
|
||||
'action:unpause'
|
||||
'action:unpause',
|
||||
'action:terminate'
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
@@ -308,6 +313,26 @@ export default {
|
||||
button.className = "btn btn-outline-secondary";
|
||||
button.addEventListener('click', () => this.$emit('action:pause', [cell.getData()]));
|
||||
container.append(button);
|
||||
|
||||
// Terminate
|
||||
if(this.permissionTerminateAntrag){
|
||||
button = document.createElement('button');
|
||||
icon = document.createElement('i');
|
||||
span = document.createElement('span');
|
||||
|
||||
icon.className = "fa-solid fa-xmark";
|
||||
icon.setAttribute('aria-hidden', true);
|
||||
icon.setAttribute('title', this.$p.t('studierendenantrag', 'btn_terminate'));
|
||||
|
||||
span.className = "fa-sr-only";
|
||||
span.append(this.$p.t('studierendenantrag', 'btn_terminate'));
|
||||
|
||||
button.append(icon);
|
||||
button.append(span);
|
||||
button.className = "btn btn-outline-danger";
|
||||
button.addEventListener('click', () => this.$emit('action:terminate', [cell.getData()]));
|
||||
container.append(button);
|
||||
}
|
||||
}
|
||||
|
||||
let canUnpause = data.status == 'Pause' && !['AbmeldungStgl', 'Studienabbruch'].includes(data.status_insertvon);
|
||||
@@ -337,6 +362,26 @@ export default {
|
||||
button.className = "btn btn-outline-secondary";
|
||||
button.addEventListener('click', () => this.$emit('action:unpause', [cell.getData()]));
|
||||
container.append(button);
|
||||
|
||||
// Terminate: show buttion
|
||||
if(this.permissionTerminateAntrag){
|
||||
button = document.createElement('button');
|
||||
icon = document.createElement('i');
|
||||
span = document.createElement('span');
|
||||
|
||||
icon.className = "fa-solid fa-xmark";
|
||||
icon.setAttribute('aria-hidden', true);
|
||||
icon.setAttribute('title', this.$p.t('studierendenantrag', 'btn_terminate'));
|
||||
|
||||
span.className = "fa-sr-only";
|
||||
span.append(this.$p.t('studierendenantrag', 'btn_terminate'));
|
||||
|
||||
button.append(icon);
|
||||
button.append(span);
|
||||
button.className = "btn btn-outline-danger";
|
||||
button.addEventListener('click', () => this.$emit('action:terminate', [cell.getData()]));
|
||||
container.append(button);
|
||||
}
|
||||
}
|
||||
|
||||
if (data.typ == 'AbmeldungStgl' && data.status == 'Genehmigt') {
|
||||
|
||||
Reference in New Issue
Block a user