mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
student profile role info verband/gruppe/semester links to old cis list; reworked role info data to also work in english lol;
This commit is contained in:
@@ -567,7 +567,7 @@ class Profil extends FHCAPI_Controller
|
||||
*/
|
||||
private function getStudentInfo($uid)
|
||||
{
|
||||
$this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']);
|
||||
$this->StudentModel->addSelect(['tbl_studiengang.bezeichnung as studiengang', 'tbl_studiengang.studiengang_kz as studiengang_kz', 'tbl_student.semester', 'tbl_student.verband', 'tbl_student.gruppe', 'tbl_student.matrikelnr as personenkennzeichen']);
|
||||
$this->StudentModel->addJoin('tbl_studiengang', "tbl_studiengang.studiengang_kz=tbl_student.studiengang_kz");
|
||||
|
||||
$student_res = $this->StudentModel->load([$uid]);
|
||||
|
||||
@@ -198,6 +198,15 @@ export default {
|
||||
editable() {
|
||||
return this.data?.editAllowed ?? false;
|
||||
},
|
||||
getTelefonValue() {
|
||||
if(this.data.standort_telefon?.kontakt) {
|
||||
return this.data.standort_telefon.kontakt + " " + this.data.telefonklappe
|
||||
} else if(this.data.standort_telefon) {
|
||||
return this.data.standort_telefon + " " + this.data.telefonklappe
|
||||
} else {
|
||||
return this.data.telefonklappe
|
||||
}
|
||||
},
|
||||
filteredEditData() {
|
||||
return this.editDataFilter
|
||||
? this.editData.data[this.editDataFilter]
|
||||
@@ -226,13 +235,36 @@ export default {
|
||||
}
|
||||
|
||||
return {
|
||||
[`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum,
|
||||
[`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
[`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz,
|
||||
[`${this.$p.t('profil', 'Telefon')}`]:
|
||||
(this.data.standort_telefon ? this.data.standort_telefon.kontakt + " " + this.data.telefonklappe : this.data.telefonklappe),
|
||||
[`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz,
|
||||
geburtsdatum: {
|
||||
label: `${this.$p.t('profil','Geburtsdatum')}`,
|
||||
value: this.data.gebdatum
|
||||
},
|
||||
geburtsort: {
|
||||
label: `${this.$p.t('profil','Geburtsort')}`,
|
||||
value: this.data.gebort
|
||||
},
|
||||
personenkennzeichen: {
|
||||
label: `${this.$p.t('profil','Kurzzeichen')}`,
|
||||
value: this.data.kurzbz
|
||||
},
|
||||
telefon: {
|
||||
label: `${this.$p.t('profil','Telefon')}`,
|
||||
value: this.getTelefonValue
|
||||
},
|
||||
office: {
|
||||
label: `${this.$p.t('profil','Büro')}`,
|
||||
value: this.data.ort_kurzbz
|
||||
}
|
||||
};
|
||||
|
||||
// return {
|
||||
// [`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum,
|
||||
// [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
// [`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz,
|
||||
// [`${this.$p.t('profil', 'Telefon')}`]:
|
||||
// (this.data.standort_telefon ? this.data.standort_telefon.kontakt + " " + this.data.telefonklappe : this.data.telefonklappe),
|
||||
// [`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz,
|
||||
// };
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -93,6 +93,15 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
getTelefonValue() {
|
||||
if(this.data.standort_telefon?.kontakt) {
|
||||
return this.data.standort_telefon.kontakt + " " + this.data.telefonklappe
|
||||
} else if(this.data.standort_telefon) {
|
||||
return this.data.standort_telefon + " " + this.data.telefonklappe
|
||||
} else {
|
||||
return this.data.telefonklappe
|
||||
}
|
||||
},
|
||||
editable() {
|
||||
return this.data?.editAllowed ?? false;
|
||||
},
|
||||
@@ -122,15 +131,37 @@ export default {
|
||||
if (!this.data) {
|
||||
return {};
|
||||
}
|
||||
|
||||
return {
|
||||
[`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum,
|
||||
[`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
[`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz,
|
||||
[`${this.$p.t('profil', 'Telefon')}`]:
|
||||
(this.data.standort_telefon ? this.data.standort_telefon + " " + this.data.telefonklappe : this.data.telefonklappe),
|
||||
[`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz,
|
||||
geburtsdatum: {
|
||||
label: `${this.$p.t('profil','Geburtsdatum')}`,
|
||||
value: this.data.gebdatum
|
||||
},
|
||||
geburtsort: {
|
||||
label: `${this.$p.t('profil','Geburtsort')}`,
|
||||
value: this.data.gebort
|
||||
},
|
||||
personenkennzeichen: {
|
||||
label: `${this.$p.t('profil','Kurzzeichen')}`,
|
||||
value: this.data.kurzbz
|
||||
},
|
||||
telefon: {
|
||||
label: `${this.$p.t('profil','Telefon')}`,
|
||||
value: this.getTelefonValue
|
||||
},
|
||||
office: {
|
||||
label: `${this.$p.t('profil','Büro')}`,
|
||||
value: this.data.ort_kurzbz
|
||||
}
|
||||
};
|
||||
|
||||
// return {
|
||||
// [`${this.$p.t('profil', 'Geburtsdatum')}`]: this.data.gebdatum,
|
||||
// [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
// [`${this.$p.t('profil', 'Kurzzeichen')}`]: this.data.kurzbz,
|
||||
// [`${this.$p.t('profil', 'Telefon')}`]:
|
||||
// (this.data.standort_telefon ? this.data.standort_telefon + " " + this.data.telefonklappe : this.data.telefonklappe),
|
||||
// [`${this.$p.t('profil', 'Büro')}`]: this.data.ort_kurzbz,
|
||||
// };
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
@@ -10,7 +10,25 @@ export default {
|
||||
type: String,
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
inject: [
|
||||
'studiengang_kz', // inject info that should not be displayed
|
||||
],
|
||||
computed: {
|
||||
getLinkGruppeListe() {
|
||||
return this.data.gruppe?.value && this.data.verband?.value && this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value
|
||||
+ '&verband=' + this.data.verband.value + '&grp=' + this.data.gruppe.value : ''
|
||||
},
|
||||
getLinkVerbandListe() {
|
||||
return this.data.verband?.value && this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value
|
||||
+ '&verband=' + this.data.verband.value : ''
|
||||
},
|
||||
getLinkSemesterListe() {
|
||||
return this.data.semester?.value ? FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/stud_in_grp.php?kz='+this.studiengang_kz+'&sem=' + this.data.semester.value : ''
|
||||
}
|
||||
},
|
||||
created() {
|
||||
//TODO: check if data.Telefon is a valid telefon number to call before using it as a tel: link
|
||||
},
|
||||
@@ -19,16 +37,40 @@ export default {
|
||||
<div class="card-header">{{title}}</div>
|
||||
<div class="card-body">
|
||||
<div class="gy-3 row">
|
||||
<div v-for="(wert,bez) in data" class="col-md-6 col-sm-12 ">
|
||||
<div v-for="(entry, key) in data" class="col-md-6 col-sm-12 ">
|
||||
|
||||
<div class="form-underline">
|
||||
<div class="form-underline-titel">{{bez }}</div>
|
||||
<div class="form-underline-titel">{{entry.label }}</div>
|
||||
|
||||
<!-- print Telefon link -->
|
||||
<a v-if="bez=='Telefon'" :href="data.Telefon?'tel:'+data.Telefon:null" :class="{'form-underline-content':true,'text-decoration-none':!data.Telefon,'text-body':!data.Telefon}">{{wert?wert:'-'}}</a>
|
||||
<a v-if="key == 'telefon'" :href="entry.value ?'tel:'+entry.value:null" :class="{'form-underline-content':true,'text-decoration-none':!entry.value,'text-body':!entry.value}">{{entry.value ?? '-'}}</a>
|
||||
|
||||
<!-- print semester link -->
|
||||
<span v-else-if="key == 'semester' && entry.value" class="form-underline-content">
|
||||
{{ entry.value }}
|
||||
<a class="ms-auto mb-2" target="_blank" :href="getLinkSemesterListe">
|
||||
<i class="fa fa-arrow-up-right-from-square me-1"></i>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- print verband link -->
|
||||
<span v-else-if="key =='verband' && entry.value" class="form-underline-content">
|
||||
{{ entry.value }}
|
||||
<a class="ms-auto mb-2" target="_blank" :href="getLinkVerbandListe">
|
||||
<i class="fa fa-arrow-up-right-from-square me-1"></i>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- print gruppe link -->
|
||||
<span v-else-if="key == 'gruppe' && entry.value" class="form-underline-content">
|
||||
{{ entry.value }}
|
||||
<a class="ms-auto mb-2" target="_blank" :href="getLinkGruppeListe">
|
||||
<i class="fa fa-arrow-up-right-from-square me-1"></i>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- else print information -->
|
||||
<span v-else class="form-underline-content">{{wert?wert:'-'}}</span>
|
||||
<span v-else class="form-underline-content">{{ entry.value ?? '-'}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -84,6 +84,11 @@ export default {
|
||||
data: Object,
|
||||
editData: Object,
|
||||
},
|
||||
provide() {
|
||||
return {
|
||||
studiengang_kz: Vue.computed({ get: () => this.data.studiengang_kz }),
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
betriebsmittelTableBuilt: function () {
|
||||
@@ -172,14 +177,46 @@ export default {
|
||||
}
|
||||
|
||||
return {
|
||||
[`${this.$p.t('profil','Geburtsdatum')}`]: this.data.gebdatum,
|
||||
[`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
[`${this.$p.t('person', 'personenkennzeichen')}`]: this.data.personenkennzeichen,
|
||||
[`${this.$p.t('lehre', 'studiengang')}`]: this.data.studiengang,
|
||||
[`${this.$p.t('lehre', 'semester')}`]: this.data.semester,
|
||||
[`${this.$p.t('lehre', 'lehrverband')}`]: this.data.verband,
|
||||
[`${this.$p.t('lehre', 'gruppe')}`]: this.data.gruppe.trim(),
|
||||
geburtsdatum: {
|
||||
label: `${this.$p.t('profil','Geburtsdatum')}`,
|
||||
value: this.data.gebdatum
|
||||
},
|
||||
geburtsort: {
|
||||
label: `${this.$p.t('profil','Geburtsort')}`,
|
||||
value: this.data.gebort
|
||||
},
|
||||
personenkennzeichen: {
|
||||
label: `${this.$p.t('person','personenkennzeichen')}`,
|
||||
value: this.data.personenkennzeichen
|
||||
},
|
||||
studiengang: {
|
||||
label: `${this.$p.t('lehre','studiengang')}`,
|
||||
value: this.data.studiengang
|
||||
},
|
||||
semester: {
|
||||
label: `${this.$p.t('lehre','semester')}`,
|
||||
value: this.data.semester
|
||||
},
|
||||
verband: {
|
||||
label: `${this.$p.t('lehre','lehrverband')}`,
|
||||
value: this.data.verband
|
||||
},
|
||||
gruppe: {
|
||||
label: `${this.$p.t('lehre','gruppe')}`,
|
||||
value: this.data.gruppe.trim()
|
||||
}
|
||||
};
|
||||
|
||||
// so nicht
|
||||
// return {
|
||||
// [`${this.$p.t('profil','Geburtsdatum')}`]: this.data.gebdatum,
|
||||
// [`${this.$p.t('profil', 'Geburtsort')}`]: this.data.gebort,
|
||||
// [`${this.$p.t('person', 'personenkennzeichen')}`]: this.data.personenkennzeichen,
|
||||
// [`${this.$p.t('lehre', 'studiengang')}`]: this.data.studiengang,
|
||||
// [`${this.$p.t('lehre', 'semester')}`]: this.data.semester,
|
||||
// [`${this.$p.t('lehre', 'lehrverband')}`]: this.data.verband,
|
||||
// [`${this.$p.t('lehre', 'gruppe')}`]: this.data.gruppe.trim(),
|
||||
// };
|
||||
},
|
||||
},
|
||||
created() {
|
||||
|
||||
@@ -17,6 +17,12 @@ export default {
|
||||
},
|
||||
|
||||
props: ["data"],
|
||||
provide() {
|
||||
return {
|
||||
studiengang_kz: Vue.computed({ get: () => this.data.studiengang_kz }),
|
||||
}
|
||||
},
|
||||
|
||||
methods: {},
|
||||
|
||||
computed: {
|
||||
@@ -49,15 +55,47 @@ export default {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
Geburtsdatum: this.data.gebdatum,
|
||||
Geburtsort: this.data.gebort,
|
||||
Personenkennzeichen: this.data.personenkennzeichen,
|
||||
Studiengang: this.data.studiengang,
|
||||
Semester: this.data.semester,
|
||||
Verband: this.data.verband,
|
||||
Gruppe: this.data.gruppe.trim(),
|
||||
geburtsdatum: {
|
||||
label: `${this.$p.t('profil','Geburtsdatum')}`,
|
||||
value: this.data.gebdatum
|
||||
},
|
||||
geburtsort: {
|
||||
label: `${this.$p.t('profil','Geburtsort')}`,
|
||||
value: this.data.gebort
|
||||
},
|
||||
personenkennzeichen: {
|
||||
label: `${this.$p.t('person','Geburtsort')}`,
|
||||
value: this.data.personenkennzeichen
|
||||
},
|
||||
studiengang: {
|
||||
label: `${this.$p.t('lehre','Geburtsort')}`,
|
||||
value: this.data.studiengang
|
||||
},
|
||||
semester: {
|
||||
label: `${this.$p.t('lehre','Geburtsort')}`,
|
||||
value: this.data.semester
|
||||
},
|
||||
verband: {
|
||||
label: `${this.$p.t('lehre','Geburtsort')}`,
|
||||
value: this.data.verband
|
||||
},
|
||||
gruppe: {
|
||||
label: `${this.$p.t('lehre','Geburtsort')}`,
|
||||
value: this.data.gruppe.trim()
|
||||
}
|
||||
};
|
||||
|
||||
// return {
|
||||
// Geburtsdatum: this.data.gebdatum,
|
||||
// Geburtsort: this.data.gebort,
|
||||
// Personenkennzeichen: this.data.personenkennzeichen,
|
||||
// Studiengang: this.data.studiengang,
|
||||
// Semester: this.data.semester,
|
||||
// Verband: this.data.verband,
|
||||
// Gruppe: this.data.gruppe.trim(),
|
||||
// };
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user