mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Searchbar Student Prestudent
This commit is contained in:
@@ -61,7 +61,7 @@ $route['api/v1/organisation/[O|o]rganisationseinheit/(:any)'] = 'api/v1/organisa
|
||||
$route['api/v1/ressource/[B|b]etriebsmittelperson/(:any)'] = 'api/v1/ressource/betriebsmittelperson2/$1';
|
||||
$route['api/v1/system/[S|s]prache/(:any)'] = 'api/v1/system/sprache2/$1';
|
||||
|
||||
$route['studentenverwaltung/(:any)'] = 'Studentenverwaltung/index';
|
||||
$route['studentenverwaltung/(:any)/(:any)'] = 'Studentenverwaltung/index';
|
||||
|
||||
// load routes from extensions
|
||||
$subdir = 'application/config/extensions';
|
||||
|
||||
@@ -22,26 +22,27 @@ class Student extends FHC_Controller
|
||||
// TODO(chris): stdSem from Variable
|
||||
$studiensemester_kurzbz='SS2023';
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->StudentModel->addSelect('p.*');
|
||||
$this->StudentModel->addSelect('tbl_student.student_uid');
|
||||
$this->StudentModel->addSelect('matrikelnr');
|
||||
$this->StudentModel->addSelect('b.aktiv');
|
||||
$this->StudentModel->addSelect('v.semester');
|
||||
$this->StudentModel->addSelect('v.verband');
|
||||
$this->StudentModel->addSelect('v.gruppe');
|
||||
$this->StudentModel->addSelect('b.alias');
|
||||
$this->PrestudentModel->addSelect('p.*');
|
||||
$this->PrestudentModel->addSelect('s.student_uid');
|
||||
$this->PrestudentModel->addSelect('matrikelnr');
|
||||
$this->PrestudentModel->addSelect('b.aktiv');
|
||||
$this->PrestudentModel->addSelect('v.semester');
|
||||
$this->PrestudentModel->addSelect('v.verband');
|
||||
$this->PrestudentModel->addSelect('v.gruppe');
|
||||
$this->PrestudentModel->addSelect('b.alias');
|
||||
|
||||
if (defined('ACTIVE_ADDONS') && strpos(ACTIVE_ADDONS, 'bewerbung') !== false) {
|
||||
$this->StudentModel->addSelect("(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung ORDER BY kontakt_id LIMIT 1) AS email_privat", false);
|
||||
$this->PrestudentModel->addSelect("(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung ORDER BY kontakt_id LIMIT 1) AS email_privat", false);
|
||||
}
|
||||
|
||||
$this->StudentModel->addJoin('public.tbl_benutzer b', 'student_uid = uid');
|
||||
$this->StudentModel->addJoin('public.tbl_studentlehrverband v', 'b.uid = v.student_uid AND v.studiensemester_kurzbz = ' . $this->StudentModel->escape($studiensemester_kurzbz), 'LEFT');
|
||||
$this->StudentModel->addJoin('public.tbl_person p', 'person_id');
|
||||
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT');
|
||||
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 'student_uid = uid', 'LEFT');
|
||||
$this->PrestudentModel->addJoin('public.tbl_studentlehrverband v', 'b.uid = v.student_uid AND v.studiensemester_kurzbz = ' . $this->PrestudentModel->escape($studiensemester_kurzbz), 'LEFT');
|
||||
$this->PrestudentModel->addJoin('public.tbl_person p', 'p.person_id = tbl_prestudent.person_id');
|
||||
|
||||
$result = $this->StudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
|
||||
$result = $this->PrestudentModel->loadWhere(['prestudent_id' => $prestudent_id]);
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
@@ -119,7 +120,8 @@ class Student extends FHC_Controller
|
||||
$this->form_validation->set_rules('gebdatum', 'Geburtsdatum', 'callback_isValidDate', [
|
||||
'isValidDate' => $this->p->t('ui', 'error_invalid_date')
|
||||
]);
|
||||
// TODO(chris): other validations?
|
||||
|
||||
$this->form_validation->set_rules('semester', 'Semester', 'integer');
|
||||
|
||||
if ($this->form_validation->run() == false) {
|
||||
return $this->outputJsonError($this->form_validation->error_array());
|
||||
@@ -259,4 +261,5 @@ class Student extends FHC_Controller
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ class Students extends FHC_Controller
|
||||
* /(studiengang_kz)/(org_form)/(semester)/(verband)/(gruppe)
|
||||
* => getStudents
|
||||
* /uid/(student_uid) => getStudent
|
||||
* /prestudent/(prestudent_id) => getPrestudent
|
||||
*
|
||||
* @param string $method
|
||||
* @param array $params (optional)
|
||||
@@ -67,6 +68,9 @@ class Students extends FHC_Controller
|
||||
if ($method == 'uid' && $count == 1)
|
||||
return $this->getStudent($params[0]);
|
||||
|
||||
if ($method == 'prestudent' && $count == 1)
|
||||
return $this->getPrestudent($params[0]);
|
||||
|
||||
if (is_numeric($params[0])) {
|
||||
$sem = $params[0];
|
||||
if ($count == 3 && $params[1] == 'grp') {
|
||||
@@ -341,4 +345,80 @@ class Students extends FHC_Controller
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $prestudent_id
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function getPrestudent($prestudent_id)
|
||||
{
|
||||
// TODO(chris): stdSem from Variable
|
||||
$studiensemester_kurzbz='SS2023';
|
||||
|
||||
$this->load->model('crm/Prestudent_model', 'PrestudentModel');
|
||||
|
||||
$this->PrestudentModel->addJoin('public.tbl_person p', 'person_id');
|
||||
$this->PrestudentModel->addJoin('public.tbl_student s', 'prestudent_id', 'LEFT');
|
||||
$this->PrestudentModel->addJoin('public.tbl_benutzer b', 's.student_uid=b.uid', 'LEFT');
|
||||
$this->PrestudentModel->addJoin(
|
||||
'public.tbl_studentlehrverband v',
|
||||
'v.student_uid=s.student_uid AND v.studiensemester_kurzbz=' . $this->PrestudentModel->escape($studiensemester_kurzbz),
|
||||
'LEFT'
|
||||
);
|
||||
|
||||
$this->PrestudentModel->addSelect('p.person_id');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.prestudent_id');
|
||||
$this->PrestudentModel->addSelect('b.uid');
|
||||
$this->PrestudentModel->addSelect('titelpre');
|
||||
$this->PrestudentModel->addSelect('titelpost');
|
||||
$this->PrestudentModel->addSelect('vorname');
|
||||
$this->PrestudentModel->addSelect('wahlname');
|
||||
$this->PrestudentModel->addSelect('vornamen');
|
||||
$this->PrestudentModel->addSelect('geschlecht');
|
||||
$this->PrestudentModel->addSelect('nachname');
|
||||
$this->PrestudentModel->addSelect('gebdatum');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.anmerkung');
|
||||
$this->PrestudentModel->addSelect('ersatzkennzeichen');
|
||||
$this->PrestudentModel->addSelect('svnr');
|
||||
$this->PrestudentModel->addSelect('s.matrikelnr');
|
||||
$this->PrestudentModel->addSelect('p.anmerkung AS anmerkungen');
|
||||
$this->PrestudentModel->addSelect('v.semester');
|
||||
$this->PrestudentModel->addSelect('v.verband');
|
||||
$this->PrestudentModel->addSelect('v.gruppe');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.studiengang_kz');
|
||||
$this->PrestudentModel->addSelect('aufmerksamdurch_kurzbz');
|
||||
$this->PrestudentModel->addSelect('mentor');
|
||||
$this->PrestudentModel->addSelect('b.aktiv AS bnaktiv');
|
||||
$this->PrestudentModel->addSelect(
|
||||
"(SELECT kontakt FROM public.tbl_kontakt WHERE kontakttyp='email' AND person_id=p.person_id AND zustellung LIMIT 1) AS email_privat",
|
||||
false
|
||||
);
|
||||
$this->PrestudentModel->addSelect(
|
||||
"(SELECT rt_gesamtpunkte AS punkte FROM public.tbl_prestudent WHERE prestudent_id=s.prestudent_id) AS punkte",
|
||||
false
|
||||
);
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.dual');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.reihungstest_id');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.anmeldungreihungstest');
|
||||
$this->PrestudentModel->addSelect('p.matr_nr');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.gsstudientyp_kurzbz');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.aufnahmegruppe_kurzbz');
|
||||
$this->PrestudentModel->addSelect('tbl_prestudent.priorisierung');
|
||||
$this->PrestudentModel->addSelect('p.zugangscode');
|
||||
$this->PrestudentModel->addSelect('p.bpk');
|
||||
|
||||
$where = [];
|
||||
|
||||
$result = $this->PrestudentModel->loadWhere([
|
||||
'tbl_prestudent.prestudent_id' => $prestudent_id
|
||||
]);
|
||||
|
||||
if (isError($result)) {
|
||||
$this->output->set_status_header(REST_Controller::HTTP_INTERNAL_SERVER_ERROR);
|
||||
$this->outputJson(getError($result));
|
||||
} else {
|
||||
$this->outputJson(getData($result) ?: []);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +260,35 @@ class SearchBarLib
|
||||
*/
|
||||
private function _student($searchstr, $type)
|
||||
{
|
||||
$dbModel = new DB_Model();
|
||||
|
||||
$students = $dbModel->execReadOnlyQuery('
|
||||
SELECT
|
||||
\''.$type.'\' AS type,
|
||||
s.student_uid AS uid,
|
||||
s.matrikelnr,
|
||||
p.person_id AS person_id,
|
||||
p.vorname || \' \' || p.nachname AS name,
|
||||
k.kontakt as email ,
|
||||
p.foto
|
||||
FROM public.tbl_student s
|
||||
JOIN public.tbl_benutzer b ON(b.uid = s.student_uid)
|
||||
JOIN public.tbl_person p USING(person_id)
|
||||
LEFT JOIN (
|
||||
SELECT kontakt, person_id
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = \'email\'
|
||||
) as k USING(person_id)
|
||||
WHERE b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
GROUP BY type, s.student_uid, s.matrikelnr, p.person_id, name, email, p.foto
|
||||
');
|
||||
|
||||
// If something has been found then return it
|
||||
if (hasData($students)) return getData($students);
|
||||
|
||||
// Otherwise return an empty array
|
||||
return array();
|
||||
}
|
||||
|
||||
@@ -268,6 +297,41 @@ class SearchBarLib
|
||||
*/
|
||||
private function _prestudent($searchstr, $type)
|
||||
{
|
||||
$dbModel = new DB_Model();
|
||||
|
||||
$prestudent = $dbModel->execReadOnlyQuery('
|
||||
SELECT
|
||||
\''.$type.'\' AS type,
|
||||
ps.prestudent_id,
|
||||
ps.studiengang_kz,
|
||||
p.person_id AS person_id,
|
||||
b.uid,
|
||||
p.vorname || \' \' || p.nachname AS name,
|
||||
(
|
||||
SELECT kontakt
|
||||
FROM public.tbl_kontakt
|
||||
WHERE kontakttyp = \'email\'
|
||||
AND person_id = p.person_id
|
||||
LIMIT 1
|
||||
) as email,
|
||||
p.foto,
|
||||
sg.bezeichnung
|
||||
FROM public.tbl_prestudent ps
|
||||
LEFT JOIN public.tbl_student s USING (prestudent_id)
|
||||
LEFT JOIN public.tbl_benutzer b ON (b.uid = s.student_uid)
|
||||
JOIN public.tbl_person p ON (p.person_id = ps.person_id)
|
||||
LEFT JOIN public.tbl_studiengang sg ON (sg.studiengang_kz = ps.studiengang_kz)
|
||||
WHERE b.uid ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.vorname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
OR p.nachname ILIKE \'%'.$dbModel->escapeLike($searchstr).'%\'
|
||||
or cast(ps.prestudent_id as text) ILIKE \'%'.$dbModel->escapeLIKE($searchstr).'%\'
|
||||
GROUP BY type, b.uid, ps.prestudent_id, ps.studiengang_kz, sg.bezeichnung, s.student_uid, s.matrikelnr, p.person_id, name, email, p.foto
|
||||
');
|
||||
|
||||
// If something has been found then return it
|
||||
if (hasData($prestudent)) return getData($prestudent);
|
||||
|
||||
// Otherwise return an empty array
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ const router = VueRouter.createRouter({
|
||||
history: VueRouter.createWebHistory(),
|
||||
routes: [
|
||||
{ path: `/${ciPath}/studentenverwaltung`, component: FhcStudentenverwaltung },
|
||||
{ path: `/${ciPath}/studentenverwaltung/:id`, component: FhcStudentenverwaltung }
|
||||
{ path: `/${ciPath}/studentenverwaltung/prestudent/:prestudent_id`, component: FhcStudentenverwaltung },
|
||||
{ path: `/${ciPath}/studentenverwaltung/student/:id`, component: FhcStudentenverwaltung }
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
@@ -50,35 +50,28 @@ export default {
|
||||
selected: [],
|
||||
searchbaroptions: {
|
||||
types: [
|
||||
"person",
|
||||
"student",
|
||||
"prestudent"
|
||||
],
|
||||
actions: {
|
||||
person: {
|
||||
student: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function(data) {
|
||||
return data.profil;
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/studentenverwaltung/student/' + data.uid;
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
{
|
||||
"label": "testchildaction1",
|
||||
"icon": "fas fa-check-circle",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('person testchildaction 01 ' + JSON.stringify(data));
|
||||
}
|
||||
},
|
||||
{
|
||||
"label": "testchildaction2",
|
||||
"icon": "fas fa-file-csv",
|
||||
"type": "function",
|
||||
"action": function(data) {
|
||||
alert('person testchildaction 02 ' + JSON.stringify(data));
|
||||
}
|
||||
]
|
||||
},
|
||||
prestudent: {
|
||||
defaultaction: {
|
||||
type: "link",
|
||||
action: function(data) {
|
||||
return FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + '/studentenverwaltung/prestudent/' + data.prestudent_id;
|
||||
}
|
||||
},
|
||||
childactions: [
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -102,6 +95,10 @@ export default {
|
||||
if (this.$route.params.id) {
|
||||
this.$refs.stvList.updateUrl('components/stv/students/uid/' + this.$route.params.id);
|
||||
}
|
||||
if (this.$route.params.prestudent_id) {
|
||||
this.$refs.stvList.updateUrl('components/stv/students/prestudent/' + this.$route.params.prestudent_id);
|
||||
}
|
||||
|
||||
},
|
||||
template: `
|
||||
<header class="navbar navbar-expand-lg navbar-dark bg-dark flex-md-nowrap p-0 shadow">
|
||||
|
||||
@@ -189,22 +189,19 @@ export default {
|
||||
});
|
||||
this.updateStudent(this.student);
|
||||
},
|
||||
mounted() {
|
||||
console.log();
|
||||
},
|
||||
//TODO(chris): Geburtszeit? Anzahl der Kinder?
|
||||
template: `
|
||||
<div ref="form" class="stv-details-details h-100 pb-3">
|
||||
<fieldset>
|
||||
<fieldset class="overflow-hidden">
|
||||
<legend>Person</legend>
|
||||
<template v-if="data">
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-person_id" class="col-sm-1 col-form-label">Person ID</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-person_id" type="text" class="form-control" v-model="data.person_id" disabled>
|
||||
</div>
|
||||
<label v-if="showZugangscode" for="stv-details-zugangscode" class="col-sm-1 col-form-label">Zugangscode</label>
|
||||
<div v-if="showZugangscode" class="col-sm-3">
|
||||
<div v-if="showZugangscode" class="col-sm-3 align-self-center">
|
||||
<span class="form-text">
|
||||
<a :href="cisRoot + 'addons/bewerbung/cis/registration.php?code=' + data.zugangscode + '&emailAdresse=' + data.email_privat" target="_blank">{{data.zugangscode}}</a>
|
||||
</span>
|
||||
@@ -214,7 +211,7 @@ export default {
|
||||
<input id="stv-details-bpk" type="text" class="form-control" v-model="data.bpk" maxlength="28">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-anrede" class="col-sm-1 col-form-label">Anrede</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-anrede" type="text" class="form-control" v-model="data.anrede" maxlength="16">
|
||||
@@ -228,7 +225,7 @@ export default {
|
||||
<input id="stv-details-titelpost" type="text" class="form-control" v-model="data.titelpost" maxlength="32">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-nachname" class="col-sm-1 col-form-label">Nachname</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-nachname" type="text" class="form-control" v-model="data.nachname" maxlength="64">
|
||||
@@ -242,13 +239,13 @@ export default {
|
||||
<input id="stv-details-vornamen" type="text" class="form-control" v-model="data.vornamen" maxlength="128">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-wahlname" class="col-sm-1 col-form-label">Wahlname</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-wahlname" type="text" class="form-control" v-model="data.wahlname" maxlength="128">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="dp-input-stv-details-gebdatum" class="col-sm-1 col-form-label">Geburtsdatum</label>
|
||||
<div class="col-sm-3">
|
||||
<vue-date-picker id="stv-details-gebdatum" :input-class-name="gebDatumIsInvalid ? 'form-control is-invalid' : (gebDatumIsValid ? 'form-control is-valid' : 'form-control')" uid="stv-details-gebdatum" v-model="data.gebdatum" :clearable="false" no-today auto-apply :enable-time-picker="false" format="dd.MM.yyyy" preview-format="dd.MM.yyyy"></vue-date-picker>
|
||||
@@ -266,7 +263,7 @@ export default {
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-svnr" class="col-sm-1 col-form-label">SVNR</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-svnr" type="text" class="form-control" v-model="data.svnr" maxlength="16">
|
||||
@@ -276,7 +273,7 @@ export default {
|
||||
<input id="stv-details-ersatzkennzeichen" type="text" class="form-control" v-model="data.ersatzkennzeichen" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-staatsbuergerschaft" class="col-sm-1 col-form-label">Staatsbürgerschaft</label>
|
||||
<div class="col-sm-3">
|
||||
<select id="stv-details-staatsbuergerschaft" class="form-control" v-model="data.staatsbuergerschaft">
|
||||
@@ -296,7 +293,7 @@ export default {
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-geschlecht" class="col-sm-1 col-form-label">Geschlecht</label>
|
||||
<div class="col-sm-3">
|
||||
<select id="stv-details-geschlecht" class="form-control" v-model="data.geschlecht">
|
||||
@@ -329,10 +326,10 @@ export default {
|
||||
Loading...
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<fieldset v-if="data?.student_uid" class="overflow-hidden">
|
||||
<legend>StudentIn</legend>
|
||||
<template v-if="data">
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-student_uid" class="col-sm-1 col-form-label">UID</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-student_uid" type="text" class="form-control" v-model="data.student_uid" disabled>
|
||||
@@ -342,13 +339,13 @@ export default {
|
||||
<input id="stv-details-personenkennzeichen" type="text" class="form-control" v-model="data.matrikelnr" disabled>
|
||||
</div>
|
||||
<label for="stv-details-aktiv" class="col-sm-1 col-form-label">Aktiv</label>
|
||||
<div class="col-sm-3">
|
||||
<div class="col-sm-3 align-self-center">
|
||||
<div class="form-check">
|
||||
<input id="stv-details-aktiv" type="checkbox" class="form-check-input" v-model="data.aktiv">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-semester" class="col-sm-1 col-form-label">Semester</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-semester" type="text" class="form-control" v-model="data.semester" maxlength="2">
|
||||
@@ -362,20 +359,21 @@ export default {
|
||||
<input id="stv-details-gruppe" type="text" class="form-control" v-model="data.gruppe" maxlength="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3 align-items-center">
|
||||
<div class="row mb-3">
|
||||
<label for="stv-details-alias" class="col-sm-1 col-form-label">Alias</label>
|
||||
<div class="col-sm-3">
|
||||
<input id="stv-details-alias" type="text" class="form-control" v-model="data.alias" :disabled="aliasNotAllowed">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary" @click="save" :disabled="!changedLength">Speichern</button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
<div v-else>
|
||||
Loading...
|
||||
</div>
|
||||
</fieldset>
|
||||
<div>
|
||||
<button type="button" class="btn btn-primary" @click="save" :disabled="!changedLength">Speichern</button>
|
||||
</div>
|
||||
<pv-toast ref="responseToast" style="z-index:9999"></pv-toast>
|
||||
</div>`
|
||||
};
|
||||
@@ -0,0 +1,88 @@
|
||||
import action from "./action.js";
|
||||
import actions from "./actions.js";
|
||||
|
||||
export default {
|
||||
props: [ "res", "actions" ],
|
||||
components: {
|
||||
action: action,
|
||||
actions: actions
|
||||
},
|
||||
emits: [ 'actionexecuted' ],
|
||||
template: `
|
||||
<div class="searchbar_result searchbar_prestudent">
|
||||
|
||||
<div class="searchbar_grid">
|
||||
<div class="searchbar_icon">
|
||||
<action :res="this.res" :action="this.actions.defaultaction" @actionexecuted="$emit('actionexecuted')">
|
||||
<img v-if="(typeof res.foto !== 'undefined') && (res.foto !== null)"
|
||||
:src="'data:image/jpeg;base64,' + res.foto"
|
||||
class="rounded-circle" height="100"/>
|
||||
<i v-else class="fas fa-user-circle fa-5x"></i>
|
||||
</action>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_data">
|
||||
<action :res="this.res" :action="this.actions.defaultaction" @actionexecuted="$emit('actionexecuted')">
|
||||
<span class="fw-bold">{{ res.name }}</span>
|
||||
</action>
|
||||
|
||||
<div class="mb-3"></div>
|
||||
|
||||
<div class="searchbar_table">
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Prestudent_id</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.prestudent_id }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Student_uid</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.uid }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Person_id</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.person_id }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Studiengang</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.bezeichnung }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">EMail</div>
|
||||
<div class="searchbar_tablecell">
|
||||
<a :href="this.mailtourl">
|
||||
{{ res.email }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<actions :res="this.res" :actions="this.actions.childactions"
|
||||
@actionexecuted="$emit('actionexecuted')"></actions>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`,
|
||||
methods: {
|
||||
},
|
||||
computed: {
|
||||
mailtourl: function() {
|
||||
return 'mailto:' + this.res.email;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -2,6 +2,8 @@ import person from "./person.js";
|
||||
import raum from "./raum.js";
|
||||
import employee from "./employee.js";
|
||||
import organisationunit from "./organisationunit.js";
|
||||
import student from "./student.js";
|
||||
import prestudent from "./prestudent.js";
|
||||
|
||||
export default {
|
||||
props: [ "searchoptions", "searchfunction" ],
|
||||
@@ -24,7 +26,9 @@ export default {
|
||||
person: person,
|
||||
raum: raum,
|
||||
employee: employee,
|
||||
organisationunit: organisationunit
|
||||
organisationunit: organisationunit,
|
||||
student: student,
|
||||
prestudent: prestudent
|
||||
},
|
||||
template: `
|
||||
<form ref="searchform" class="d-flex me-3" action="javascript:void(0);"
|
||||
@@ -45,6 +49,8 @@ export default {
|
||||
<div v-else-if="this.searchresult.length < 1">Es wurden keine Ergebnisse gefunden.</div>
|
||||
<template v-else="" v-for="res in this.searchresult">
|
||||
<person v-if="res.type === 'person'" :res="res" :actions="this.searchoptions.actions.person" @actionexecuted="this.hideresult"></person>
|
||||
<student v-else-if="res.type === 'student'" :res="res" :actions="this.searchoptions.actions.student" @actionexecuted="this.hideresult"></student>
|
||||
<prestudent v-else-if="res.type === 'prestudent'" :res="res" :actions="this.searchoptions.actions.prestudent" @actionexecuted="this.hideresult"></prestudent>
|
||||
<employee v-else-if="res.type === 'mitarbeiter'" :res="res" :actions="this.searchoptions.actions.employee" @actionexecuted="this.hideresult"></employee>
|
||||
<organisationunit v-else-if="res.type === 'organisationunit'" :res="res" :actions="this.searchoptions.actions.organisationunit" @actionexecuted="this.hideresult"></organisationunit>
|
||||
<raum v-else-if="res.type === 'raum'" :res="res" :actions="this.searchoptions.actions.raum" @actionexecuted="this.hideresult"></raum>
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
import action from "./action.js";
|
||||
import actions from "./actions.js";
|
||||
|
||||
export default {
|
||||
props: [ "res", "actions" ],
|
||||
components: {
|
||||
action: action,
|
||||
actions: actions
|
||||
},
|
||||
emits: [ 'actionexecuted' ],
|
||||
template: `
|
||||
<div class="searchbar_result searchbar_student">
|
||||
|
||||
<div class="searchbar_grid">
|
||||
<div class="searchbar_icon">
|
||||
<action :res="this.res" :action="this.actions.defaultaction" @actionexecuted="$emit('actionexecuted')">
|
||||
<img v-if="(typeof res.foto !== 'undefined') && (res.foto !== null)"
|
||||
:src="'data:image/jpeg;base64,' + res.foto"
|
||||
class="rounded-circle" height="100"/>
|
||||
<i v-else class="fas fa-user-circle fa-5x"></i>
|
||||
</action>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_data">
|
||||
<action :res="this.res" :action="this.actions.defaultaction" @actionexecuted="$emit('actionexecuted')">
|
||||
<span class="fw-bold">{{ res.name }}</span>
|
||||
</action>
|
||||
|
||||
<div class="mb-3"></div>
|
||||
|
||||
<div class="searchbar_table">
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Student_uid</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.uid }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Person_id</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.person_id }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">Matrikelnummer</div>
|
||||
<div class="searchbar_tablecell">
|
||||
{{ res.matrikelnr }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="searchbar_tablerow">
|
||||
<div class="searchbar_tablecell">EMail</div>
|
||||
<div class="searchbar_tablecell">
|
||||
<a :href="this.mailtourl">
|
||||
{{ res.email }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<actions :res="this.res" :actions="this.actions.childactions"
|
||||
@actionexecuted="$emit('actionexecuted')"></actions>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
`,
|
||||
methods: {
|
||||
},
|
||||
computed: {
|
||||
mailtourl: function() {
|
||||
return 'mailto:' + this.res.email;
|
||||
}
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user