mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
adapt inline form validations, edit validation in final exam tab
This commit is contained in:
@@ -242,6 +242,10 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Typ'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('akadgrad_id', 'AkadGrad', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'AkadGrad'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('datum', 'Datum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Datum'])
|
||||
]);
|
||||
@@ -309,6 +313,10 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
$this->form_validation->set_rules('pruefungstyp_kurzbz', 'Typ', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'Typ'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('akadgrad_id', 'AkadGrad', 'required', [
|
||||
'required' => $this->p->t('ui', 'error_fieldRequired', ['field' => 'AkadGrad'])
|
||||
]);
|
||||
|
||||
$this->form_validation->set_rules('datum', 'Datum', 'is_valid_date', [
|
||||
'is_valid_date' => $this->p->t('ui', 'error_notValidDate', ['field' => 'Datum'])
|
||||
|
||||
@@ -1337,13 +1337,13 @@ class Status extends FHCAPI_Controller
|
||||
'updatevon' => $authUID
|
||||
];
|
||||
foreach ([
|
||||
'orgform_kurzbz',
|
||||
'anmerkung',
|
||||
'bewerbung_abgeschicktamum',
|
||||
'studienplan_id',
|
||||
'rt_stufe',
|
||||
'statusgrund_id'
|
||||
] as $key)
|
||||
'orgform_kurzbz',
|
||||
'anmerkung',
|
||||
'bewerbung_abgeschicktamum',
|
||||
'studienplan_id',
|
||||
'rt_stufe',
|
||||
'statusgrund_id'
|
||||
] as $key)
|
||||
if ($this->input->post($key))
|
||||
$updateData[$key] = $this->input->post($key);
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ export default {
|
||||
getAbschlusspruefung (url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/abschlusspruefung/getAbschlusspruefung/' + params.id);
|
||||
},
|
||||
addNewAbschlusspruefung(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/abschlusspruefung/insertAbschlusspruefung/', data
|
||||
addNewAbschlusspruefung(form, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/abschlusspruefung/insertAbschlusspruefung/', data
|
||||
);
|
||||
},
|
||||
loadAbschlusspruefung(id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/abschlusspruefung/loadAbschlusspruefung/', {id});
|
||||
},
|
||||
updateAbschlusspruefung(data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/abschlusspruefung/updateAbschlusspruefung/', data
|
||||
updateAbschlusspruefung(form, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/abschlusspruefung/updateAbschlusspruefung/', data
|
||||
);
|
||||
},
|
||||
deleteAbschlusspruefung(id){
|
||||
|
||||
@@ -2,8 +2,8 @@ export default {
|
||||
get(prestudent_id) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/student/get/' + prestudent_id);
|
||||
},
|
||||
save(prestudent_id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/student/save/' + prestudent_id,
|
||||
save(form, prestudent_id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/student/save/' + prestudent_id,
|
||||
data
|
||||
);
|
||||
},
|
||||
|
||||
@@ -9,11 +9,9 @@ export default {
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getTypenPruefungen');
|
||||
},
|
||||
getAllLehreinheiten(data){
|
||||
console.log("all Lehreinheiten");
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/pruefung/getAllLehreinheiten/', data)
|
||||
},
|
||||
getLvsByStudent(uid){
|
||||
console.log(uid);
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/pruefung/getLvsByStudent/' + uid)
|
||||
},
|
||||
getLvsandLesByStudent(uid){
|
||||
|
||||
@@ -3,16 +3,16 @@ export default {
|
||||
getAdressen (url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getAdressen/' + params.id);
|
||||
},
|
||||
addNewAddress(id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewAddress/' + id,
|
||||
addNewAddress(form, id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/addNewAddress/' + id,
|
||||
data
|
||||
);
|
||||
},
|
||||
loadAddress(address_id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadAddress/', {address_id});
|
||||
},
|
||||
updateAddress(address_id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateAddress/' + address_id,
|
||||
updateAddress(form, address_id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/updateAddress/' + address_id,
|
||||
data
|
||||
);
|
||||
},
|
||||
@@ -36,16 +36,16 @@ export default {
|
||||
getBankverbindung (url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getBankverbindung/' + params.id);
|
||||
},
|
||||
addNewBankverbindung(id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewBankverbindung/' + id,
|
||||
addNewBankverbindung(form, id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/addNewBankverbindung/' + id,
|
||||
data
|
||||
);
|
||||
},
|
||||
loadBankverbindung(bankverbindung_id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadBankverbindung/', {bankverbindung_id});
|
||||
},
|
||||
updateBankverbindung(bankverbindung_id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateBankverbindung/' + bankverbindung_id,
|
||||
updateBankverbindung(form, bankverbindung_id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/updateBankverbindung/' + bankverbindung_id,
|
||||
data
|
||||
);
|
||||
},
|
||||
@@ -57,16 +57,16 @@ export default {
|
||||
getKontakte (url, config, params){
|
||||
return this.$fhcApi.get('api/frontend/v1/stv/kontakt/getKontakte/' + params.id);
|
||||
},
|
||||
addNewContact(id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/addNewContact/' + id,
|
||||
addNewContact(form, id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/addNewContact/' + id,
|
||||
data
|
||||
);
|
||||
},
|
||||
loadContact(kontakt_id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/loadContact/', {kontakt_id});
|
||||
},
|
||||
updateContact(kontakt_id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/kontakt/updateContact/' + kontakt_id,
|
||||
updateContact(form, kontakt_id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/kontakt/updateContact/' + kontakt_id,
|
||||
data
|
||||
);
|
||||
},
|
||||
|
||||
@@ -5,8 +5,8 @@ export default {
|
||||
get(prestudent_id){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/prestudent/get/' + prestudent_id);
|
||||
},
|
||||
updatePrestudent(prestudent_id, data){
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/prestudent/updatePrestudent/' + prestudent_id,
|
||||
updatePrestudent(form, prestudent_id, data){
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/prestudent/updatePrestudent/' + prestudent_id,
|
||||
data
|
||||
);
|
||||
},
|
||||
|
||||
@@ -2,8 +2,8 @@ export default {
|
||||
|
||||
//------------- Modal.js------------------------------------------------------
|
||||
|
||||
insertStatus(id, data) {
|
||||
return this.$fhcApi.post('api/frontend/v1/stv/status/insertStatus/' + id,
|
||||
insertStatus(form, id, data) {
|
||||
return this.$fhcApi.post(form, 'api/frontend/v1/stv/status/insertStatus/' + id,
|
||||
data
|
||||
);
|
||||
},
|
||||
@@ -16,8 +16,9 @@ export default {
|
||||
+ ausbildungssemester
|
||||
);
|
||||
},
|
||||
updateStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}, data) {
|
||||
updateStatus(form, {prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}, data) {
|
||||
return this.$fhcApi.post(
|
||||
form,
|
||||
'api/frontend/v1/stv/status/updateStatus/'
|
||||
+ prestudent_id + '/'
|
||||
+ status_kurzbz + '/'
|
||||
|
||||
+9
-9
@@ -258,7 +258,7 @@ export default {
|
||||
formData: this.formData
|
||||
};
|
||||
|
||||
return this.$refs.formFinalExam.factory.stv.abschlusspruefung.addNewAbschlusspruefung(dataToSend)
|
||||
return this.$fhcApi.factory.stv.abschlusspruefung.addNewAbschlusspruefung(this.$refs.formFinalExam, dataToSend)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.resetForm();
|
||||
@@ -286,7 +286,7 @@ export default {
|
||||
id: abschlusspruefung_id,
|
||||
formData: this.formData
|
||||
};
|
||||
return this.$refs.formFinalExam.factory.stv.abschlusspruefung.updateAbschlusspruefung(dataToSend)
|
||||
return this.$fhcApi.factory.stv.abschlusspruefung.updateAbschlusspruefung(this.$refs.formFinalExam, dataToSend)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.resetForm();
|
||||
@@ -415,7 +415,7 @@ export default {
|
||||
<h4>{{this.$p.t('stv','tab_finalexam')}}</h4>
|
||||
|
||||
<div v-if="this.student.length">
|
||||
<AbschlusspruefungDropdown
|
||||
<abschlusspruefung-dropdown
|
||||
:showAllFormats="isBerechtigtDocAndOdt"
|
||||
:studentUids="studentUids"
|
||||
:showDropDownMulti="true"
|
||||
@@ -423,7 +423,7 @@ export default {
|
||||
:stgKz="stg_kz"
|
||||
:cisRoot="cisRoot"
|
||||
@linkGenerated="printDocument"
|
||||
></AbschlusspruefungDropdown>
|
||||
></abschlusspruefung-dropdown>
|
||||
</div>
|
||||
|
||||
<core-filter-cmpt
|
||||
@@ -641,7 +641,7 @@ export default {
|
||||
:label="$p.t('abschlusspruefung', 'akadGrad')"
|
||||
type="select"
|
||||
v-model="formData.akadgrad_id"
|
||||
name="akadgrad"
|
||||
name="akadgrad_id"
|
||||
>
|
||||
<option
|
||||
v-for="grad in arrAkadGrad"
|
||||
@@ -744,8 +744,8 @@ export default {
|
||||
</div>
|
||||
<div class="col">
|
||||
<p>
|
||||
<a :href="formData.link" target="_blank" rel="noopener noreferrer">
|
||||
{{$p.t('abschlusspruefung', 'pruefungsprotokoll')}}
|
||||
<a :href="formData.link" target="_blank" rel="noopener noreferrer">
|
||||
{{$p.t('abschlusspruefung', 'pruefungsprotokoll')}}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -758,7 +758,7 @@ export default {
|
||||
|
||||
</form-form>
|
||||
<Teleport v-for="data in tabulatorData" :key="data.abschlusspruefung_id" :to="data.actionDiv">
|
||||
<AbschlusspruefungDropdown
|
||||
<abschlusspruefung-dropdown
|
||||
:showAllFormats="isBerechtigtDocAndOdt"
|
||||
:showDropDownMulti="false"
|
||||
:abschlusspruefung_id="data.abschlusspruefung_id"
|
||||
@@ -767,7 +767,7 @@ export default {
|
||||
:stgKz="stg_kz"
|
||||
:cisRoot="cisRoot"
|
||||
@linkGenerated="printDocument"
|
||||
></AbschlusspruefungDropdown>
|
||||
></abschlusspruefung-dropdown>
|
||||
</Teleport>
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
return;
|
||||
|
||||
this.$refs.form.clearValidation();
|
||||
return this.$fhcApi.factory.stv.details.save(this.modelValue.prestudent_id, this.changed)
|
||||
return this.$fhcApi.factory.stv.details.save(this.$refs.form, this.modelValue.prestudent_id, this.changed)
|
||||
.then(result => {
|
||||
this.original = {...this.data};
|
||||
this.changed = {};
|
||||
|
||||
@@ -243,7 +243,7 @@ export default{
|
||||
},
|
||||
addNewAddress(addressData) {
|
||||
this.addressData.plz = this.addressData.address.plz;
|
||||
return this.$refs.addressData.factory.stv.kontakt.addNewAddress(this.uid, this.addressData)
|
||||
return this.$fhcApi.factory.stv.kontakt.addNewAddress(this.$refs.addressData, this.uid, this.addressData)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal('adressModal');
|
||||
@@ -263,14 +263,13 @@ export default{
|
||||
this.addressData = result.data;
|
||||
this.addressData.address = {};
|
||||
this.addressData.address.plz = this.addressData.plz || null;
|
||||
// delete this.addressData.plz;
|
||||
return result;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
updateAddress(adresse_id) {
|
||||
this.addressData.plz = this.addressData.address.plz;
|
||||
return this.$refs.addressData.factory.stv.kontakt.updateAddress(adresse_id,
|
||||
return this.$fhcApi.factory.stv.kontakt.updateAddress(this.$refs.addressData, adresse_id,
|
||||
this.addressData
|
||||
).then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
@@ -278,7 +277,6 @@ export default{
|
||||
this.resetModal();
|
||||
}).catch(this.$fhcAlert.handleSystemError)
|
||||
.finally(() => {
|
||||
//window.scrollTo(0, 0);
|
||||
this.reload();
|
||||
});
|
||||
},
|
||||
|
||||
@@ -169,7 +169,7 @@ export default{
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addNewBankverbindung(bankverbindungData) {
|
||||
return this.$refs.bankverbindungData.factory.stv.kontakt.addNewBankverbindung(this.uid, this.bankverbindungData)
|
||||
return this.$fhcApi.factory.stv.kontakt.addNewBankverbindung(this.$refs.bankverbindungData, this.uid, this.bankverbindungData)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal('bankverbindungModal');
|
||||
@@ -191,7 +191,7 @@ export default{
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
updateBankverbindung(bankverbindung_id){
|
||||
return this.$refs.bankverbindungData.factory.stv.kontakt.updateBankverbindung(bankverbindung_id,
|
||||
return this.$fhcApi.factory.stv.kontakt.updateBankverbindung(this.$refs.bankverbindungData, bankverbindung_id,
|
||||
this.bankverbindungData)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
@@ -239,7 +239,7 @@ export default{
|
||||
<div class="stv-details-kontakt-bankaccount h-100 pt-3">
|
||||
|
||||
<!--Modal: Bankverbindung-->
|
||||
<BsModal ref="bankverbindungModal">
|
||||
<bs-modal ref="bankverbindungModal">
|
||||
<template #title>
|
||||
<p v-if="statusNew" class="fw-bold mt-3">{{$p.t('person', 'bankvb_new')}}</p>
|
||||
<p v-else class="fw-bold mt-3">{{$p.t('person', 'bankvb_edit')}}</p>
|
||||
@@ -335,7 +335,7 @@ export default{
|
||||
<button v-else type="button" class="btn btn-primary" @click="updateBankverbindung(bankverbindungData.bankverbindung_id)">OK</button>
|
||||
</template>
|
||||
|
||||
</BsModal>
|
||||
</bs-modal>
|
||||
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
|
||||
@@ -181,7 +181,7 @@ export default{
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
addNewContact(formData) {
|
||||
return this.$refs.contactData.factory.stv.kontakt.addNewContact(this.uid, this.contactData)
|
||||
return this.$fhcApi.factory.stv.kontakt.addNewContact(this.$refs.contactData, this.uid, this.contactData)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.hideModal("contactModal");
|
||||
@@ -217,7 +217,7 @@ export default{
|
||||
});
|
||||
},
|
||||
updateContact(kontakt_id){
|
||||
return this.$refs.contactData.factory.stv.kontakt.updateContact(kontakt_id,
|
||||
return this.$fhcApi.factory.stv.kontakt.updateContact(this.$refs.contactData, kontakt_id,
|
||||
this.contactData)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
|
||||
@@ -101,7 +101,7 @@ export default {
|
||||
this.initialFormData = {...(this.initialFormData || {}), ...udfs};
|
||||
},
|
||||
updatePrestudent(){
|
||||
return this.$refs.form.factory.stv.prestudent.updatePrestudent(this.modelValue.prestudent_id, this.deltaArray)
|
||||
return this.$fhcApi.factory.stv.prestudent.updatePrestudent(this.$refs.form, this.modelValue.prestudent_id, this.deltaArray)
|
||||
.then(response => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.initialFormData = {...this.data};
|
||||
|
||||
@@ -142,7 +142,7 @@ export default{
|
||||
}
|
||||
},
|
||||
insertStatus() {
|
||||
this.$fhcApi.factory.stv.status.insertStatus(this.statusId, this.formData)
|
||||
this.$fhcApi.factory.stv.status.insertStatus(this.$refs.form, this.statusId, this.formData)
|
||||
.then(result => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.$reloadList();
|
||||
@@ -152,7 +152,7 @@ export default{
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
editStatus() {
|
||||
this.$fhcApi.factory.stv.status.updateStatus(this.statusId, this.formData)
|
||||
this.$fhcApi.factory.stv.status.updateStatus(this.$refs.form, this.statusId, this.formData)
|
||||
.then(result => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave'));
|
||||
this.$reloadList();
|
||||
|
||||
Reference in New Issue
Block a user