mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-11 17:19:29 +00:00
Merge branch 'master' into demo-cis40
This commit is contained in:
@@ -20,6 +20,10 @@ if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class AuthInfo extends FHCAPI_Controller
|
||||
{
|
||||
protected $uid;
|
||||
protected $pid;
|
||||
protected $isMitarbeiter;
|
||||
protected $isStudent;
|
||||
|
||||
/**
|
||||
* Object initialization
|
||||
@@ -28,10 +32,16 @@ class AuthInfo extends FHCAPI_Controller
|
||||
{
|
||||
parent::__construct([
|
||||
'getAuthUID' => self::PERM_LOGGED,
|
||||
'getAuthInfo' => self::PERM_LOGGED,
|
||||
]);
|
||||
|
||||
$this->load->model('crm/Student_model', 'StudentModel');
|
||||
$this->load->model('ressource/Mitarbeiter_model', 'MitarbeiterModel');
|
||||
|
||||
$this->uid = getAuthUID();
|
||||
$this->pid = getAuthPersonID();
|
||||
$this->isMitarbeiter = getData($this->MitarbeiterModel->isMitarbeiter($this->uid)) ?? false;
|
||||
$this->isStudent = getData($this->StudentModel->isStudent($this->uid)) ?? false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------------------------------------
|
||||
@@ -47,6 +57,14 @@ class AuthInfo extends FHCAPI_Controller
|
||||
$this->terminateWithSuccess(['uid'=>$this->uid]);
|
||||
}
|
||||
|
||||
|
||||
public function getAuthInfo()
|
||||
{
|
||||
$data = (object) array(
|
||||
'uid' => $this->uid,
|
||||
'isMitarbeiter' => $this->isMitarbeiter,
|
||||
'isStudent' => $this->isStudent
|
||||
);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -58,8 +58,8 @@ class Studium extends FHCAPI_Controller
|
||||
$parameter_semester = $this->input->get('semester',true);
|
||||
$parameter_studienplan = $this->input->get('studienplan',true);
|
||||
|
||||
$aktuelles_studiensemester = current($this->getDataOrTerminateWithError($this->StudiensemesterModel->getAkt()));
|
||||
|
||||
$aktuelles_studiensemester = current($this->getDataOrTerminateWithError($this->StudiensemesterModel->getAktOrNextSemester()));
|
||||
|
||||
if($this->getDataOrTerminateWithError($this->StudentModel->isStudent(getAuthUID()))){
|
||||
$studentLehrverband =$this->StudentlehrverbandModel->loadWhere(["student_uid" => getAuthUID(), "studiensemester_kurzbz" => $aktuelles_studiensemester->studiensemester_kurzbz]);
|
||||
$studentLehrverband = current($this->getDataOrTerminateWithError($studentLehrverband));
|
||||
|
||||
@@ -159,7 +159,7 @@ class Student extends FHCAPI_Controller
|
||||
{
|
||||
$laufendesStudiensemester = '';
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
$result = $this->StudiensemesterModel->getNearest();
|
||||
$result = $this->StudiensemesterModel->getAktOrNextSemester();
|
||||
if(hasData($result)) {
|
||||
$laufendesStudiensemester = (getData($result))[0]->studiensemester_kurzbz;
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
@media (min-width: 1440px) {
|
||||
.lvUebersicht {
|
||||
grid-template-columns: 1fr 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 992px){
|
||||
@media (max-width: 1439px){
|
||||
.lvUebersicht{
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
@@ -38,13 +38,13 @@
|
||||
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
@media (min-width: 1440px) {
|
||||
.lvOptions {
|
||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
@media (max-width: 1439px) {
|
||||
.lvOptions {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,8 @@
|
||||
|
||||
.widgets-news img
|
||||
{
|
||||
max-width: 100%;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.fhc-news-menu-item {
|
||||
|
||||
@@ -6,5 +6,10 @@ export default {
|
||||
{ }
|
||||
);
|
||||
},
|
||||
|
||||
getAuthInfo() {
|
||||
return this.$fhcApi.get(
|
||||
'/api/frontend/v1/AuthInfo/getAuthInfo',
|
||||
{}
|
||||
);
|
||||
},
|
||||
};
|
||||
@@ -21,5 +21,11 @@ export default {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/AuthInfo/getAuthUID'
|
||||
};
|
||||
},
|
||||
getAuthInfo() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/AuthInfo/getAuthInfo'
|
||||
};
|
||||
}
|
||||
};
|
||||
@@ -19,7 +19,9 @@ export default {
|
||||
studiensemester_kurzbz: null,
|
||||
studiensemester_start: null,
|
||||
studiensemester_ende: null,
|
||||
uid: null
|
||||
uid: null,
|
||||
isMitarbeiter: false,
|
||||
isStudent: false
|
||||
};
|
||||
},
|
||||
computed:{
|
||||
@@ -36,7 +38,15 @@ export default {
|
||||
downloadLinks() {
|
||||
if (!this.studiensemester_start || !this.studiensemester_ende || !this.uid)
|
||||
return false;
|
||||
|
||||
|
||||
let type = false;
|
||||
type = this.isStudent ? 'student' : type;
|
||||
type = this.isMitarbeiter ? 'lektor' : type;
|
||||
if (false === type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const opts = { zone: this.viewData.timezone };
|
||||
const start = luxon.DateTime
|
||||
.fromISO(this.studiensemester_start, opts)
|
||||
@@ -47,7 +57,7 @@ export default {
|
||||
|
||||
const download_link = FHC_JS_DATA_STORAGE_OBJECT.app_root
|
||||
+ 'cis/private/lvplan/stpl_kalender.php'
|
||||
+ '?type=student'
|
||||
+ '?type=' + type
|
||||
+ '&pers_uid=' + this.uid
|
||||
+ '&begin=' + start
|
||||
+ '&ende=' + ende;
|
||||
@@ -96,9 +106,11 @@ export default {
|
||||
},
|
||||
created() {
|
||||
this.$api
|
||||
.call(ApiAuthinfo.getAuthUID())
|
||||
.call(ApiAuthinfo.getAuthInfo())
|
||||
.then(res => {
|
||||
this.uid = res.data.uid;
|
||||
this.isMitarbeiter = res.data.isMitarbeiter;
|
||||
this.isStudent = res.data.isStudent;
|
||||
});
|
||||
},
|
||||
template: /*html*/`
|
||||
|
||||
@@ -117,7 +117,7 @@ export default {
|
||||
</button>
|
||||
<fhc-searchbar ref="searchbar" id="nav-search" class="fhc-searchbar w-100 py-1 py-lg-2" :searchoptions="searchbaroptions" :searchfunction="searchfunction"></fhc-searchbar>
|
||||
<div id="nav-logo" class="d-none d-lg-block">
|
||||
<div class="d-flex h-100">
|
||||
<div class="d-flex h-100 justify-content-between">
|
||||
<a :href="rootUrl">
|
||||
<img :src="logoUrl" alt="Corporate Identity Logo">
|
||||
</a>
|
||||
|
||||
@@ -8,7 +8,7 @@ export default {
|
||||
},
|
||||
template: `
|
||||
<div class="cis-renderer-feiertage-calendar-event">
|
||||
<i class="event-icon" class="fa-regular fa-calendar"></i>
|
||||
<i class="event-icon fa-regular fa-calendar"></i>
|
||||
<span class="event-title fw-bold text-center">{{ event.titel }}</span>
|
||||
</div>`,
|
||||
};
|
||||
@@ -23,7 +23,7 @@ export default {
|
||||
template:/*html*/`
|
||||
<div class="container">
|
||||
<div class="row justify-content-center align-items-center flex-nowrap overflow-hidden">
|
||||
<button v-for="lang in allActiveLanguages" @click.prevent="changeLanguage(lang.sprache)" class="col fhc-text sprachen-entry btn text-center w-100" :selected="$p.user_language.value==lang.sprache">{{lang.bezeichnung}}</button>
|
||||
<button v-for="lang in allActiveLanguages" @click.prevent="changeLanguage(lang.sprache)" class="col fhc-text-light sprachen-entry btn text-center w-100" :selected="$p.user_language.value==lang.sprache">{{lang.bezeichnung}}</button>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
||||
@@ -408,16 +408,19 @@ export default {
|
||||
|
||||
this.draggedItem = item;
|
||||
|
||||
this.$emit('draggedItem',item);
|
||||
|
||||
this.draggedNode = evt.target.closest(".drop-grid-item");
|
||||
//clones the widget for the drag Image
|
||||
let clone = evt.target.closest(".drop-grid-item")?.cloneNode(true);
|
||||
|
||||
clone.style.zIndex = 5;
|
||||
clone.classList.add("widgetClone");
|
||||
this.$refs.container.appendChild(clone);
|
||||
this.clonedWidget = clone;
|
||||
this.$emit('draggedItem', item);
|
||||
// workaround for chrome fireing event dragend when styles are manipulated during dragging
|
||||
setTimeout(() => {
|
||||
this.draggedNode = evt.target.closest(".drop-grid-item");
|
||||
//clones the widget for the drag Image
|
||||
let clone = evt.target.closest(".drop-grid-item")?.cloneNode(true);
|
||||
|
||||
clone.style.zIndex = 5;
|
||||
clone.classList.add("widgetClone");
|
||||
this.$refs.container.appendChild(clone);
|
||||
this.clonedWidget = clone;
|
||||
}, 0);
|
||||
|
||||
this.draggedOffset = [item.x - this.x, item.y - this.y];
|
||||
this._dragStart(evt, item);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user