AbmeldungStgl GrundDropdown

This commit is contained in:
ma0068
2023-08-17 09:12:30 +02:00
parent 353e2deaf7
commit fcd3733f3c
4 changed files with 431 additions and 7 deletions
@@ -129,7 +129,7 @@ class Studierendenantrag extends FHC_Controller
]);
}
public function abmeldungstgl($prestudent_id, $studierendenantrag_id)
public function abmeldungstgl($prestudent_id, $studierendenantrag_id = null)
{
$this->load->view('lehre/Antrag/Create', [
'prestudent_id' => $prestudent_id,
@@ -13,11 +13,17 @@ export default {
'setStatus'
],
props: {
prestudentId: Number,
studierendenantragId: Number
},
data() {
return {
data: null
data: null,
saving: false,
errors: {
grund: [],
default: []
}
}
},
computed: {
@@ -28,6 +34,13 @@ export default {
case 'Genehmigt': return 'success';
default: return 'info';
}
},
loadUrl() {
if (this.studierendenantragId)
return '/components/Antrag/Abmeldung/getDetailsForAntrag/'+
this.studierendenantragId;
return '/components/Antrag/Abmeldung/getDetailsForNewAntrag/' +
this.prestudentId;
}
},
methods: {
@@ -35,8 +48,7 @@ export default {
return axios.get(
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
'/components/Antrag/Abmeldung/getDetailsForAntrag/' +
this.studierendenantragId
this.loadUrl
).then(
result => {
this.data = result.data.retval;
@@ -49,7 +61,75 @@ export default {
return result;
}
);
}
},
createAntrag() {
bootstrap.Modal.getOrCreateInstance(this.$refs.modal).hide();
this.$emit('setStatus', {
msg: this.p.t_ref('studierendenantrag', 'status_x', {status: this.p.t('studierendenantrag', 'status_saving')}),
severity: 'warning'
});
this.saving = true;
for(var k in this.errors)
this.errors[k] = [];
axios.post(
FHC_JS_DATA_STORAGE_OBJECT.app_root +
FHC_JS_DATA_STORAGE_OBJECT.ci_router +
'/components/Antrag/Abmeldung/createAntrag/', {
studiensemester: this.data.studiensemester_kurzbz,
prestudent_id: this.data.prestudent_id,
grund: this.$refs.grund.value
}
).then(
result => {
if (result.data.error)
{
for (var k in result.data.retval)
{
if (this.errors[k] !== undefined)
this.errors[k].push(result.data.retval[k]);
else
this.errors.default.push(result.data.retval[k]);
}
this.$emit('setStatus', {
msg: this.p.t_ref('studierendenantrag', 'status_x', {status: this.p.t('studierendenantrag', 'status_error')}),
severity: 'danger'
});
}
else
{
if (result.data.retval === true)
document.location += "";
this.data = result.data.retval;
if (this.data.status) {
this.$emit("setStatus", {
msg: this.p.t_ref('studierendenantrag', 'status_x', {status: this.data.statustyp}),
severity: this.statusSeverity
});
}
else
this.$emit('setStatus', {
msg: this.p.t_ref('studierendenantrag', 'status_x', {status: this.p.t('studierendenantrag', 'status_open')}),
severity:'success'
});
}
this.saving = false;
}
);
},
appendDropDownText(event){
let templateText = this.$refs.grund;
if(event.target.value)
{
let templateT= this.p.t('studierendenantrag', event.target.value);
templateText.value = templateT;
}
else
templateText.value = '';
},
},
created() {
this.uuid = _uuid++;
},
template: `
<div class="studierendenantrag-form-abmeldung">
@@ -83,11 +163,96 @@ export default {
</tr>
</table>
</div>
<div class="mb-3">
<div v-if="data.grund" class="mb-3">
<h5>{{p.t('studierendenantrag', 'antrag_grund')}}:</h5>
<div class="mb-3">
<h5>if data grund:</h5>
<pre>{{data.grund}}</pre>
</div>
<pre>{{data.grund}}</pre>
</div>
<div v-else class="col-sm-6 mb-3">
<label :for="'studierendenantrag-form-abmeldung-' + uuid + '-grund'" class="form-label">Grund:</label>
<div class="mb-2">
<select name="grundAv" @change="appendDropDownText
($event)">
<option value="" > --- bitte auswählen, sofern zutreffend ---- </option>
<option value="textLong_NichtantrittStudium">{{p.t('studierendenantrag', 'dropdown_NichtantrittStudium')}}
</option>
<option value="textLong_ungenuegendeLeistung">{{p.t('studierendenantrag', 'dropdown_ungenuegendeLeistung')}}
</option>
<option value="textLong_studentNichtAnwesend">{{p.t('studierendenantrag', 'dropdown_nichtAnwesend')}}
</option>
<option value="textLong_PruefunstermineNichtEingehalten">{{p.t('studierendenantrag', 'dropdown_PruefunstermineNichtEingehalten')}}
</option>
<option value="textLong_studentNichtGezahlt">{{p.t('studierendenantrag', 'dropdown_nichtGezahlt')}}
</option>
<option value="textLong_plageat">{{p.t('studierendenantrag', 'dropdown_plageat')}}
</option>
</select>
</div>
<textarea
class="form-control"
:class="{'is-invalid': errors.grund.length}"
:id="'studierendenantrag-form-abmeldung-' + uuid + '-grund'"
rows="5"
:disabled="saving"
ref="grund"
required
></textarea>
<div v-if="errors.grund.length" class="invalid-feedback">
{{errors.grund.join(".")}}
</div>
</div>
<div class="col-12 text-end">
<button
v-else-if="!data.studierendenantrag_id"
type="button"
class="btn btn-primary"
data-bs-toggle="modal"
:data-bs-target="'#studierendenantrag-form-abmeldung-' + uuid + '-modal'"
:disabled="saving"
>
{{p.t('studierendenantrag', 'btn_create_Abmeldung')}}
</button>
<div
ref="modal"
class="modal fade text-start"
:id="'studierendenantrag-form-abmeldung-' + uuid + '-modal'"
tabindex="-1"
:aria-labelledby="'studierendenantrag-form-abmeldung-' + uuid + '-modal-label'"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5
class="modal-title"
:id="'studierendenantrag-form-abmeldung-' + uuid + '-modal-label'"
>
{{p.t('studierendenantrag', 'title_Abmeldung')}}
</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" :aria-label="p.t('ui', 'schliessen')"></button>
</div>
<div class="modal-body" v-html="p.t('studierendenantrag', 'warning_Abmeldung')">
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-primary"
@click="createAntrag">
{{p.t('studierendenantrag', 'btn_create_Abmeldung')}}
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<template v-slot:error="{errorMessage}">
<div class="alert alert-danger m-0" role="alert">
{{ errorMessage }}
@@ -22,7 +22,7 @@ export default {
},
computed: {
newUrl() {
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/lehre/Studierendenantrag/abmeldung/' + this.student.prestudent_id;
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/lehre/Studierendenantrag/abmeldungStgl/' + this.student.prestudent_id;
}
},
methods: {
+259
View File
@@ -20766,6 +20766,265 @@ array(
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_studentNichtGezahlt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): Nichterfüllung finanzieller Verpflichtungen trotz Mahnung (Studienbeitrag)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): Failure to meet financial obligations despite a reminder (tuition fees)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_studentNichtAnwesend',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): mehrmalig unentschuldigtes Verletzen der Anwesenheitspflicht',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): multiple unexcused breaches of attendance requirements',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_PruefunstermineNichtEingehalten',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): wiederholtes Nichteinhalten von Prüfungsterminen bzw Abgabeterminen für Seminararbeiten bzw. Projektarbeiten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): repeated non-compliance with examination dates or deadlines for seminar papers or project work',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_plageat',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): Plagiieren im Rahmen wissenschaftlicher Arbeiten bzw. unerlaubte Verwendung KI generierter Hilfsmittel bzw. Quellen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): Plagiarism in the context of scientific work or unauthorized use of AI-generated tools or sources',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_ungenuegendeLeistung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): nicht genügende Leistung im Sinne der Prüfungsordnung',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): insufficient performance in terms of the examination regulations',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'textLong_NichtantrittStudium',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Ausschlußgrund gemäß Ausbildungsvertrag (Punkt 7.4): Nichtantritt des Studiums zu Beginn des Studienjahres (=Unbegründetes Nichterscheinen zur ersten Studienveranstaltung)',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Reason for exclusion according to the training contract (point 7.4): Failure to start the course at the beginning of the academic year (= unjustified non-attendance to the first course event)',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_nichtGezahlt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Student*in hat nicht bezahlt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student has not paid',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_nichtAnwesend',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Student*in war mehrmals unentschuldigt abwesend',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student was absent without excuse several times',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_PruefunstermineNichtEingehalten',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Student*in hat Prüfunstermine nicht eingehalten',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student failed to meet exam dates',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_plageat',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Student*in hat plagiiert',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Student failed to meet exam dates',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_ungenuegendeLeistung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Leistung ungenügend',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'performance insufficient',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_NichtantrittStudium',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Nichtantritt des Studiums',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'non-commencement of the course',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'studierendenantrag',
'phrase' => 'dropdown_bitteWaehlen',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'bitte auswählen, sofern zutreffend',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'please select if applicable',
'description' => '',
'insertvon' => 'system'
)
)
),
);