Merge branch 'feature-53416/stundenplan_eine_lva' into feature-25999/C4_cleanup

This commit is contained in:
Johann Hoffmann
2024-11-13 18:59:33 +01:00
14 changed files with 63 additions and 27 deletions
@@ -34,7 +34,8 @@ class Profil extends FHCAPI_Controller
'isMitarbeiter' => self::PERM_LOGGED,
]);
$this->load->library('PermissionLib');
$this->load->model('ressource/mitarbeiter_model', 'MitarbeiterModel');
$this->load->model('crm/Student_model', 'StudentModel');
@@ -69,6 +70,7 @@ class Profil extends FHCAPI_Controller
public function getView($uid)
{
$res = new stdClass();
$editAllowed = getAuthUID() == $uid || $this->permissionlib->isBerechtigt('admin');
// if parsing the URL did not found a UID then the UID of the logged in user is used
if ($uid == "Profil" || $uid == $this->uid) {
@@ -86,6 +88,8 @@ class Profil extends FHCAPI_Controller
$res->data = $this->studentProfil();
$res->data->pid = $this->pid;
}
$editAllowed = true;
}
// UID is availabe when accessing Profil/View/:uid
else {
@@ -112,6 +116,7 @@ class Profil extends FHCAPI_Controller
$res->data = $this->viewStudentProfil($uid);
}
}
$res->data->editAllowed = $editAllowed;
$this->terminateWithSuccess($res);
}
+16
View File
@@ -238,6 +238,22 @@ html {
background-color: var(--fhc-cis-menu-lvl-2-color-active) !important;
}
.fhc-seperator {
position: relative;
}
.fhc-seperator::before {
content: '';
position: absolute;
top: 0;
left: 0;
margin-left: 12.5%;
width: 75%; /* Full width of the parent element */
height: 1px; /* Height of the border */
background: linear-gradient(to right, #ffffff, var(--fhc-cis-primary), #ffffff);
opacity: 0.8; /* Adjust opacity for a subtle fade effect */
}
/* desktop */
@media (min-width: 992px) {
body {
+2 -4
View File
@@ -18,7 +18,5 @@
}
.widgets-news .card-body{
/*max-height: calc(var(--news-widget-height)*var(--fhc-dg-row-height)); */
overflow:scroll;
}
overflow: hidden;
}
+2 -1
View File
@@ -4,6 +4,7 @@ import ViewStudentProfil from "../../components/Cis/Profil/StudentViewProfil.js"
import ViewMitarbeiterProfil from "../../components/Cis/Profil/MitarbeiterViewProfil.js";
import Loading from "../../components/Loader.js";
import Phrasen from "../../plugin/Phrasen.js";
import { setScrollbarWidth } from "../../helpers/CssVarCalcHelpers";
Vue.$collapseFormatter = function (data) {
@@ -400,7 +401,7 @@ const profilApp = Vue.createApp({
</div>`,
});
setScrollbarWidth()
profilApp
.use(primevue.config.default, { zIndex: { overlay: 9999 } })
.use(Phrasen)
+1 -1
View File
@@ -124,7 +124,7 @@ export default {
<span class="navbar-toggler-icon"></span>
</button>
<fhc-searchbar @showSettings="toggleCollapsibles" ref="searchbar" id="nav-search" class="fhc-searchbar w-100" :searchoptions="searchbaroptions" :searchfunction="searchfunction" :selectedtypes="selectedtypes"></fhc-searchbar>
<a id="nav-logo" class="d-none d-md-block" :href="rootUrl">
<a id="nav-logo" class="d-none d-sm-block" :href="rootUrl">
<img :src="logoUrl" alt="Logo">
</a>
<div id="nav-user">
@@ -195,6 +195,9 @@ export default {
},
computed: {
editable() {
return this.data?.editAllowed ?? false;
},
filteredEditData() {
return this.editDataFilter
? this.editData.data[this.editDataFilter]
@@ -299,7 +302,7 @@ export default {
<div class="col">
<!-- PROFIL INFORMATION -->
<profil-information @showEditProfilModal="showEditProfilModal" :title="$p.t('profil','mitarbeiterIn')" :data="profilInformation"></profil-information>
<profil-information @showEditProfilModal="showEditProfilModal" :title="$p.t('profil','mitarbeiterIn')" :data="profilInformation" :editable="editable"></profil-information>
</div>
@@ -93,6 +93,10 @@ export default {
},
computed: {
editable() {
return this.data?.editAllowed ?? false;
},
personEmails() {
return this.data?.emails ? this.data.emails : [];
},
@@ -161,7 +165,7 @@ export default {
<div class="col">
<!-- Profil Informationen -->
<profil-information :title="$p.t('profil','mitarbeiterIn')" :data="profilInformation"></profil-information>
<profil-information :title="$p.t('profil','mitarbeiterIn')" :data="profilInformation" :editable="editable"></profil-information>
</div>
</div>
@@ -6,6 +6,10 @@ export default {
data: {
type: Object,
},
editable: {
type: Boolean,
default: false
}
},
data() {
return {
@@ -56,7 +60,7 @@ export default {
<div class="card h-100">
<div class="card-header">
<div class="row">
<div @click="$emit('showEditProfilModal','Personen_Informationen')" class="col-auto" type="button">
<div v-if="editable" @click="$emit('showEditProfilModal','Personen_Informationen')" class="col-auto" type="button">
<i class="fa fa-edit"></i>
</div>
<div class="col">
@@ -77,7 +81,7 @@ export default {
<!-- LOCKING IMAGE FUNCTIONALITY -->
<div role="button" @click.prevent="sperre_foto_function" class="image-lock" >
<div v-if="editable" role="button" @click.prevent="sperre_foto_function" class="image-lock" >
<i :class="{'fa':true, ...(FotoSperre?{'fa-lock':true}:{'fa-lock-open':true})} " ></i>
</div>
@@ -139,6 +139,10 @@ export default {
},
computed: {
editable() {
return this.data?.editAllowed ?? false;
},
filteredEditData() {
return this.editDataFilter
? this.editData.data[this.editDataFilter]
@@ -204,8 +208,7 @@ export default {
</div>
<!-- Bearbeiten Button -->
<div class="row ">
<div v-if="editable" class="row ">
<div class="col mb-3">
<button @click="showEditProfilModal" type="button" class="text-start w-100 btn btn-outline-secondary" >
@@ -248,7 +251,7 @@ export default {
<div class="col">
<!-- PROFIL INFORMATION -->
<profil-information @showEditProfilModal="showEditProfilModal" :title="$p.t('profil','studentIn')" :data="profilInformation"></profil-information>
<profil-information @showEditProfilModal="showEditProfilModal" :title="$p.t('profil','studentIn')" :data="profilInformation" :editable="editable"></profil-information>
</div>
@@ -20,6 +20,9 @@ export default {
methods: {},
computed: {
editable() {
return this.data?.editAllowed ?? false;
},
profilInformation() {
if (!this.data) {
return {};
@@ -89,7 +92,7 @@ export default {
<div class="row mb-4">
<div class="col">
<profil-information :data="profilInformation" :title="$p.t('profil','studentIn')"></profil-information>
<profil-information :data="profilInformation" :title="$p.t('profil','studentIn')" :editable="editable"></profil-information>
</div>
</div>
+3 -2
View File
@@ -140,8 +140,9 @@ export default {
}
}).catch(err => console.error('ERROR:', err));
},
template: `<div class="core-dashboard">
<dashboard-section v-for="section in sections" :key="section.name" :name="section.name" :widgets="section.widgets" @widgetAdd="widgetAdd" @widgetUpdate="widgetUpdate" @widgetRemove="widgetRemove"></dashboard-section>
template: `
<div class="core-dashboard">
<dashboard-section v-for="(section, index) in sections" :key="section.name" :seperator="index" :name="section.name" :widgets="section.widgets" @widgetAdd="widgetAdd" @widgetUpdate="widgetUpdate" @widgetRemove="widgetRemove"></dashboard-section>
<dashboard-widget-picker ref="widgetpicker" :widgets="widgets"></dashboard-widget-picker>
</div>`
}
+4 -6
View File
@@ -16,7 +16,8 @@ export default {
},
props: [
"name",
"widgets"
"widgets",
"seperator"
],
emits: [
"widgetAdd",
@@ -32,11 +33,7 @@ export default {
},
computed: {
getSectionStyle() {
const bgString = `background:
linear-gradient(0deg, rgba(128, 128, 128, 0.05) 0%, rgba(128, 128, 128, 0.1) 50%, rgba(128, 128, 128, 0.05) 100%)`
return 'margin-bottom: 8px;' + bgString;
return 'margin-bottom: 8px;';
},
items() {
return this.widgets.map(item => {
@@ -177,6 +174,7 @@ export default {
});
},
template: `
<div v-if="seperator" class="fhc-seperator"/>
<div class="dashboard-section" ref="container" :style="getSectionStyle">
<h3>
<span >{{$p.t('ui/section' + name)}}</span>
+3 -3
View File
@@ -61,7 +61,7 @@ export default {
this.$refs.newsModal.show();
},
},
template: /*html*/ `<div class="widgets-news w-100 h-100">
template: /*html*/ `<div class="widgets-news h-100">
<div class="d-flex flex-column h-100 ">
<div class="d-flex">
@@ -69,10 +69,10 @@ export default {
<a :href="allNewsURI()" class="ms-auto mb-2">
<i class="fa fa-arrow-up-right-from-square me-1"></i>{{$p.t('news','allNews')}}</a>
</div>
<div class="h-100 overflow-scroll" v-if="width == 1">
<div class="h-100" style="overflow-y: auto" v-if="width == 1">
<div v-for="news in newsList" :key="news.id" class="mt-2">
<div class="card">
<div class=" card-body">
<div class="card-body">
<a :href="contentURI(news.content_id)" class="stretched-link" >{{ news.content_obj.betreff?news.content_obj.betreff:getDate(news.insertamum) }}</a><br>
<span class="small text-muted">{{ formatDateTime(news.insertamum) }}</span>
</div>
@@ -189,7 +189,7 @@ export default {
<content-modal :contentID="roomInfoContentID" :ort_kurzbz="" dialogClass="modal-lg" ref="contentModal"/>
<fhc-calendar @change:range="updateRange" :initial-date="currentDay" class="border-0" class-header="p-0" @select:day="selectDay" v-model:minimized="minimized" :events="events" no-week-view :show-weeks="false" >
<template #minimizedPage >
<div class="flex-grow-1" style="overflow-y: scroll; overflow-x: hidden">
<div class="flex-grow-1" style="overflow-y: auto; overflow-x: hidden">
<div v-if="events === null" class="d-flex h-100 justify-content-center align-items-center">
<i class="fa-solid fa-spinner fa-pulse fa-3x"></i>
</div>