mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 17:02:19 +00:00
Compare commits
29 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d40040efd8 | |||
| c84146fcbd | |||
| 35decf476c | |||
| 6cfc4b0973 | |||
| 6296b87ea5 | |||
| 576a44838f | |||
| c00e7a182c | |||
| fd1b5daf9c | |||
| c0b5f2f748 | |||
| b217681ee5 | |||
| 7841a73fc0 | |||
| 2064008f9e | |||
| 19b9906c86 | |||
| 2c3913a763 | |||
| 9111edf442 | |||
| b1c47da3c3 | |||
| 67eb238876 | |||
| a139cc8d2e | |||
| 35ecbdefa8 | |||
| 5f0b1ace51 | |||
| b891d8baa5 | |||
| 5dbcf9ce70 | |||
| c26db6cc40 | |||
| 8548b93ddc | |||
| bdc4782e9d | |||
| 0583990870 | |||
| 335753be8c | |||
| 8862f050e8 | |||
| 29f9b226ab |
@@ -259,7 +259,7 @@ class BetriebsmittelP extends FHCAPI_Controller
|
||||
$kaution = $this->input->post('kaution');
|
||||
if($kaution) $kaution = str_replace(',', '.', $kaution);
|
||||
$ausgegebenam = $this->input->post('ausgegebenam');
|
||||
$retouram = $this->input->post('retouram');
|
||||
$retouram = $this->input->post('retouram') == "" ? null : $this->input->post('retouram');
|
||||
|
||||
// NOTE(chris): transform_kartennummer
|
||||
if ($betriebsmitteltyp == 'Zutrittskarte' && $nummer)
|
||||
|
||||
@@ -101,6 +101,9 @@ class Widget extends FHCAPI_Controller
|
||||
$tmpsetup = json_decode($widget->setup);
|
||||
$tmpsetup->file = absoluteJsImportUrl($tmpsetup->file);
|
||||
$widget->setup = $tmpsetup;
|
||||
$widget->permitted = empty($widget->berechtigung_kurzbz)
|
||||
|| $this->permissionlib->isBerechtigt($widget->berechtigung_kurzbz);
|
||||
|
||||
return $widget;
|
||||
}, $widgets);
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ class Detailheader extends FHCAPI_Controller
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct([
|
||||
'getHeader' => ['vertrag/mitarbeiter:r'],
|
||||
'getPersonAbteilung' => ['vertrag/mitarbeiter:r'],
|
||||
'getLeitungOrg' => ['vertrag/mitarbeiter:r'],
|
||||
'getHeader' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r'],
|
||||
'getPersonAbteilung' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r'],
|
||||
'getLeitungOrg' => ['vertrag/mitarbeiter:r', 'basis/mitarbeiter:r'],
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -294,6 +294,10 @@ class Funktionen extends FHCAPI_Controller
|
||||
{
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
if($datum_von == '')
|
||||
$datum_von = null;
|
||||
if($datum_bis == '')
|
||||
$datum_bis = null;
|
||||
|
||||
$result = $this->BenutzerfunktionModel->update(
|
||||
[
|
||||
|
||||
@@ -371,6 +371,9 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$datum = $formData['datum'] == '' ? null : $formData['datum'];
|
||||
$sponsion = $formData['sponsion'] == '' ? null : $formData['sponsion'];
|
||||
|
||||
$result = $this->AbschlusspruefungModel->update(
|
||||
[
|
||||
'abschlusspruefung_id' => $abschlusspruefung_id
|
||||
@@ -382,8 +385,8 @@ class Abschlusspruefung extends FHCAPI_Controller
|
||||
'vorsitz' => $vorsitz,
|
||||
'pruefungsantritt_kurzbz' => $formData['pruefungsantritt_kurzbz'],
|
||||
'abschlussbeurteilung_kurzbz' => $formData['abschlussbeurteilung_kurzbz'],
|
||||
'datum' => $formData['datum'],
|
||||
'sponsion' => $formData['sponsion'],
|
||||
'datum' => $datum,
|
||||
'sponsion' => $sponsion,
|
||||
'pruefer1' => $pruefer1,
|
||||
'pruefer2' => $pruefer2,
|
||||
'pruefer3' => $pruefer3,
|
||||
|
||||
@@ -170,6 +170,8 @@ class Dokumente extends FHCAPI_Controller
|
||||
$this->terminateWithValidationErrors($this->form_validation->error_array());
|
||||
}
|
||||
|
||||
$nachgereicht_am = $this->input->post('nachgereicht_am') == '' ? null : $this->input->post('nachgereicht_am');
|
||||
|
||||
$uid = getAuthUID();
|
||||
|
||||
$result = $this->AkteModel->update(
|
||||
@@ -180,7 +182,7 @@ class Dokumente extends FHCAPI_Controller
|
||||
'dokument_kurzbz' => $this->input->post('dokument_kurzbz'),
|
||||
'anmerkung_intern' => $this->input->post('anmerkung_intern'),
|
||||
'titel_intern' => $this->input->post('titel_intern'),
|
||||
'nachgereicht_am' => $this->input->post('nachgereicht_am'),
|
||||
'nachgereicht_am' => $nachgereicht_am,
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $uid,
|
||||
]
|
||||
|
||||
@@ -429,9 +429,12 @@ class Konto extends FHCAPI_Controller
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => getAuthUID()
|
||||
];
|
||||
|
||||
foreach ($allowed as $field)
|
||||
if ($this->input->post($field) !== null)
|
||||
$data[$field] = $this->input->post($field);
|
||||
if($data['buchungsdatum'] == '')
|
||||
$data['buchungsdatum'] = null;
|
||||
|
||||
$result = $this->KontoModel->update($id, $data);
|
||||
|
||||
|
||||
@@ -237,8 +237,8 @@ class Mobility extends FHCAPI_Controller
|
||||
}
|
||||
$formData = $this->input->post('formData');
|
||||
|
||||
$von = $formData['von'] ?? null;
|
||||
$bis = $formData['bis'] ?? null;
|
||||
$von = ($formData['von'] ?? '') ?: null;
|
||||
$bis = ($formData['bis'] ?? '') ?: null;
|
||||
$nation_code = $formData['nation_code'] ?? null;
|
||||
$mobilitaetsprogramm_code = $formData['mobilitaetsprogramm_code'] ?? null;
|
||||
$herkunftsland_code = $formData['herkunftsland_code'] ?? null;
|
||||
|
||||
@@ -193,7 +193,7 @@ class Prestudent extends FHCAPI_Controller
|
||||
}
|
||||
elseif (
|
||||
$val === ''
|
||||
&& in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode'])
|
||||
&& in_array($prop, ['zgvnation', 'zgvmanation', 'zgvdoktornation', 'berufstaetigkeit_code', 'ausbildungcode', 'zgvdatum', 'zgvmadatum'])
|
||||
)
|
||||
{
|
||||
$val = null;
|
||||
|
||||
@@ -448,8 +448,10 @@ class Pruefung extends FHCAPI_Controller
|
||||
}
|
||||
}
|
||||
|
||||
$datum = $this->input->post('datum') == '' ? null : $this->input->post('datum');
|
||||
if(intval($pruefung_id) > 0)
|
||||
{
|
||||
|
||||
$result = $this->PruefungModel->update(
|
||||
[
|
||||
'pruefung_id' => $pruefung_id
|
||||
@@ -459,7 +461,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'note' => $this->input->post('note'),
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'datum' => $datum,
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
'updatevon' => $authUID,
|
||||
'updateamum' => date('c'),
|
||||
@@ -472,7 +474,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'lehreinheit_id' => $this->input->post('lehreinheit_id'),
|
||||
'student_uid' => $this->input->post('student_uid'),
|
||||
'mitarbeiter_uid' => $this->input->post('mitarbeiter_uid'),
|
||||
'datum' => $this->input->post('datum'),
|
||||
'datum' => $datum,
|
||||
'pruefungstyp_kurzbz' => $this->input->post('pruefungstyp_kurzbz'),
|
||||
'note' => $this->input->post('note'),
|
||||
'anmerkung' => $this->input->post('anmerkung'),
|
||||
@@ -520,7 +522,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
'studiensemester_kurzbz' => $studiensemester_kurzbz,
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'benotungsdatum' => $datum,
|
||||
'insertamum' => date('c'),
|
||||
'insertvon' => $authUID,
|
||||
'punkte' => $this->input->post('punkte') ? str_replace(',', '.', $this->input->post('punkte')) : null
|
||||
@@ -555,7 +557,7 @@ class Pruefung extends FHCAPI_Controller
|
||||
], [
|
||||
'note' => $this->input->post('note'),
|
||||
'uebernahmedatum' => date('c'),
|
||||
'benotungsdatum' => $this->input->post('datum'),
|
||||
'benotungsdatum' => $datum,
|
||||
'updateamum' => date('c'),
|
||||
'updatevon' => $authUID,
|
||||
'punkte' => $this->input->post('punkte') ? str_replace(',', '.', $this->input->post('punkte')) : null
|
||||
|
||||
@@ -296,6 +296,10 @@ class Student extends FHCAPI_Controller
|
||||
$fotoval = ($val == '') ? null : str_replace('data:image/jpeg;base64,', '', $val);
|
||||
$update_person[$prop] = $fotoval;
|
||||
}
|
||||
else if ($prop == 'gebdatum')
|
||||
{
|
||||
$update_person[$prop] = ($val == '') ? null : $val;
|
||||
}
|
||||
else
|
||||
{
|
||||
$update_person[$prop] = $val;
|
||||
|
||||
@@ -64,7 +64,7 @@ class AuthLib
|
||||
{
|
||||
// - The uid must be NOT an empty string
|
||||
// - The current user should NOT be already logged as the given uid
|
||||
if (!isEmptyString($uid) && $this->getAuthObj()->{self::AO_USERNAME} != $uid)
|
||||
if (!isEmptyString($uid) && $this->getAuthObj()->username != $uid)
|
||||
{
|
||||
$this->_ci->load->library('PermissionLib'); // Loads permissions library
|
||||
|
||||
@@ -75,28 +75,8 @@ class AuthLib
|
||||
$loginAS = $this->_createAuthObjByPerson(array('uid' => $uid));
|
||||
if (isSuccess($loginAS))
|
||||
{
|
||||
$authObj = getData($loginAS); // get the authenticate object
|
||||
|
||||
// Store the new authentication object in authentication session
|
||||
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObj);
|
||||
|
||||
$authObjOrigin = getSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ_ORIGIN);
|
||||
|
||||
// Load the LogLib
|
||||
$this->_ci->load->library('LogLib');
|
||||
// Setup the LogLib
|
||||
$this->_ci->loglib->setConfigs(
|
||||
array(
|
||||
'dbLogType' => 'API', // required
|
||||
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
|
||||
'requestId' => 'API'
|
||||
)
|
||||
);
|
||||
// Log into the database
|
||||
$this->_ci->loglib->logInfoDB(
|
||||
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has changed identity with the user "'.$authObj->{self::AO_USERNAME}.
|
||||
'" and person id '.$authObj->{self::AO_PERSON_ID}
|
||||
);
|
||||
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, getData($loginAS));
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -125,7 +105,7 @@ class AuthLib
|
||||
{
|
||||
// - The person id must be a number
|
||||
// - The current user should NOT be already logged as the given person id
|
||||
if (is_numeric($person_id) && $this->getAuthObj()->{self::AO_PERSON_ID} != $person_id)
|
||||
if (is_numeric($person_id) && $this->getAuthObj()->person_id != $person_id)
|
||||
{
|
||||
$this->_ci->load->library('PermissionLib'); // Loads permissions library
|
||||
|
||||
@@ -144,24 +124,6 @@ class AuthLib
|
||||
{
|
||||
// Store the new authentication object in authentication session
|
||||
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObj);
|
||||
|
||||
$authObjOrigin = getSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ_ORIGIN);
|
||||
|
||||
// Load the LogLib
|
||||
$this->_ci->load->library('LogLib');
|
||||
// Setup the LogLib
|
||||
$this->_ci->loglib->setConfigs(
|
||||
array(
|
||||
'dbLogType' => 'API', // required
|
||||
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
|
||||
'requestId' => 'API'
|
||||
)
|
||||
);
|
||||
// Log into the database
|
||||
$this->_ci->loglib->logInfoDB(
|
||||
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has changed identity with the user "'.$authObj->{self::AO_USERNAME}.
|
||||
'" and person id '.$authObj->{self::AO_PERSON_ID}
|
||||
);
|
||||
}
|
||||
else // if does NOT have permissions
|
||||
{
|
||||
@@ -210,22 +172,6 @@ class AuthLib
|
||||
// The LoginAs account is logged out
|
||||
// The user is again connected with its real account
|
||||
setSessionElement(self::SESSION_NAME, self::SESSION_AUTH_OBJ, $authObjOrigin);
|
||||
|
||||
// Load the LogLib
|
||||
$this->_ci->load->library('LogLib');
|
||||
// Setup the LogLib
|
||||
$this->_ci->loglib->setConfigs(
|
||||
array(
|
||||
'dbLogType' => 'API', // required
|
||||
'dbExecuteUser' => $authObjOrigin->{self::AO_USERNAME}, // current logged user
|
||||
'requestId' => 'API'
|
||||
)
|
||||
);
|
||||
// Log into the database
|
||||
$this->_ci->loglib->logInfoDB(
|
||||
'The user "'.$authObjOrigin->{self::AO_USERNAME}.'" has logout from the user "'.$authObj->{self::AO_USERNAME}.
|
||||
'" and person id '.$authObj->{self::AO_PERSON_ID}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -662,4 +608,3 @@ class AuthLib
|
||||
return $finalUserBasicDataByUID;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -122,6 +122,47 @@ class Studiensemester_model extends DB_Model
|
||||
return $this->execQuery($query, array($studiensemester_kurzbz, $limit));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the current study semester and the previous semesters of the same type (SS/WS).
|
||||
*
|
||||
* Example:
|
||||
* - SS2026, limit 3: SS2026, SS2025, SS2024
|
||||
* - WS2025, limit 2: WS2025, WS2024
|
||||
*
|
||||
* @param $studiensemester_kurzbz
|
||||
* @param $limit
|
||||
*/
|
||||
public function getPreviousSameSemesterFrom($studiensemester_kurzbz, $limit = 1)
|
||||
{
|
||||
$qry = '
|
||||
SELECT
|
||||
studiensemester_kurzbz,
|
||||
start,
|
||||
ende
|
||||
FROM
|
||||
public.tbl_studiensemester
|
||||
WHERE
|
||||
SUBSTRING(studiensemester_kurzbz FROM 1 FOR 2) = SUBSTRING(? FROM 1 FOR 2)
|
||||
AND start <= (
|
||||
SELECT start
|
||||
FROM public.tbl_studiensemester
|
||||
WHERE studiensemester_kurzbz = ?
|
||||
)
|
||||
ORDER BY
|
||||
start DESC
|
||||
LIMIT ?
|
||||
';
|
||||
|
||||
return $this->execQuery($qry,
|
||||
[
|
||||
$studiensemester_kurzbz,
|
||||
$studiensemester_kurzbz,
|
||||
$limit
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* getNearest
|
||||
*/
|
||||
|
||||
@@ -260,7 +260,6 @@ class Benutzerfunktion_model extends DB_Model
|
||||
return $this->execQuery($query, $parameters_array);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get active Kompetenzfeldleitung bei UID.
|
||||
*
|
||||
@@ -296,7 +295,6 @@ class Benutzerfunktion_model extends DB_Model
|
||||
return $this->execQuery($query, $parameters_array);
|
||||
}
|
||||
|
||||
|
||||
public function insertBenutzerfunktion($Json)
|
||||
{
|
||||
unset($Json['benutzerfunktion_id']);
|
||||
|
||||
@@ -433,6 +433,7 @@ export default {
|
||||
:label="$p.t('wawi/ausgegebenam')"
|
||||
name="ausgegebenam"
|
||||
v-model="formData.ausgegebenam"
|
||||
model-type="yyyy-MM-dd"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
@@ -449,6 +450,7 @@ export default {
|
||||
:label="$p.t('wawi/retouram')"
|
||||
name="retouram"
|
||||
v-model="formData.retouram"
|
||||
model-type="yyyy-MM-dd"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import BsModal from "../Bootstrap/Modal.js";
|
||||
import HeightTransition from "../Tranistion/HeightTransition.js";
|
||||
import MissingPermissionWidget from "../DashboardWidget/MissingPermission.js";
|
||||
|
||||
import { enableDragDropTouch } from "../../../../vendor/drag-drop-touch-js/dragdroptouch/dist/drag-drop-touch.esm.min.js";
|
||||
|
||||
@@ -113,6 +114,12 @@ export default {
|
||||
isPinned() {
|
||||
return this.place?.pinned ? true : false;
|
||||
},
|
||||
permitted() {
|
||||
// widgets without a linked permission (or before the template loaded)
|
||||
// are considered permitted; the backend sets permitted === false only
|
||||
// when the user is missing the widget's required permission
|
||||
return this.widgetTemplate?.permitted !== false;
|
||||
},
|
||||
ready() {
|
||||
return this.component && this.arguments !== null;
|
||||
},
|
||||
@@ -178,7 +185,11 @@ export default {
|
||||
&& this.widgetTemplate.widget_id
|
||||
&& this.widgetTemplate.arguments
|
||||
) {
|
||||
let component = (await import(this.widgetTemplate.setup.file)).default;
|
||||
// render the "missing permission" screen instead of the actual
|
||||
// widget when the user does not hold the widget's linked permission
|
||||
let component = this.permitted
|
||||
? (await import(this.widgetTemplate.setup.file)).default
|
||||
: MissingPermissionWidget;
|
||||
this.$options.components["widget" + this.widgetTemplate.widget_id] = component;
|
||||
this.component = "widget" + this.widgetTemplate.widget_id;
|
||||
this.arguments = { ...this.widgetTemplate.arguments, ...this.config };
|
||||
@@ -280,7 +291,7 @@ export default {
|
||||
</template>
|
||||
<!-- widget link -->
|
||||
<a
|
||||
v-if="widgetTemplate.setup.cis4link"
|
||||
v-if="widgetTemplate.setup.cis4link && permitted"
|
||||
:href="getWidgetC4Link(widgetTemplate)"
|
||||
class="col-auto ms-auto"
|
||||
:aria-label="$p.t('dashboard/widget_link')"
|
||||
|
||||
@@ -12,6 +12,12 @@ export default {
|
||||
data: () => ({
|
||||
callbacks: {}
|
||||
}),
|
||||
computed: {
|
||||
// filter widgets away the user has no permissions for
|
||||
availableWidgets() {
|
||||
return (this.widgets || []).filter(widget => widget.permitted !== false);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getWidget() {
|
||||
return new Promise((resolve,reject) => {
|
||||
@@ -37,17 +43,17 @@ export default {
|
||||
<bs-modal
|
||||
ref="modal"
|
||||
class="fade"
|
||||
:dialog-class="{ 'modal-fullscreen-sm-down': 1, 'modal-xl': widgets && widgets.length > 0 }"
|
||||
:dialog-class="{ 'modal-fullscreen-sm-down': 1, 'modal-xl': availableWidgets.length > 0 }"
|
||||
@hiddenBsModal="close"
|
||||
>
|
||||
<template v-slot:title>{{ $p.t('dashboard/createWidget') }}</template>
|
||||
<template v-slot:default>
|
||||
<div v-if="widgets" class="row g-2">
|
||||
<div v-if="!widgets.length">
|
||||
<div v-if="!availableWidgets.length">
|
||||
{{ $p.t('dashboard/noWidgetsAvailable') }}
|
||||
</div>
|
||||
<div
|
||||
v-for="widget in widgets"
|
||||
v-for="widget in availableWidgets"
|
||||
:key="widget.widget_id"
|
||||
class="widget-icon-container col-sm-6 col-md-4 col-lg-3 col-xl-2"
|
||||
>
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import AbstractWidget from './Abstract.js';
|
||||
|
||||
/**
|
||||
* Fallback screen rendered in place of a widget when the current user is missing
|
||||
* the permission (berechtigung_kurzbz) linked to that widget. Used for widgets
|
||||
* that are already on a user's dashboard but whose required permission the user
|
||||
* no longer holds.
|
||||
*/
|
||||
export default {
|
||||
mixins: [
|
||||
AbstractWidget
|
||||
],
|
||||
created() {
|
||||
this.$emit('setConfig', false);
|
||||
},
|
||||
template: /*html*/`
|
||||
<div class="dashboard-widget-missing-permission d-flex flex-column justify-content-center align-items-center text-center h-100 p-3 text-body-secondary">
|
||||
<i class="fa-solid fa-lock fa-2x mb-2" aria-hidden="true"></i>
|
||||
<p class="mb-0">{{ $p.t('dashboard/widget_missing_permission') }}</p>
|
||||
</div>`
|
||||
}
|
||||
@@ -551,6 +551,7 @@ export default {
|
||||
container-class="mb-3 col-3"
|
||||
type="DatePicker"
|
||||
v-model="formData.datum_von"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="datum_von"
|
||||
:label="$p.t('ui/from') + ' *'"
|
||||
auto-apply
|
||||
@@ -566,6 +567,7 @@ export default {
|
||||
container-class="mb-3 col-3"
|
||||
type="DatePicker"
|
||||
v-model="formData.datum_bis"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="datum_bis"
|
||||
:label="$p.t('global/bis')"
|
||||
auto-apply
|
||||
|
||||
+1
@@ -470,6 +470,7 @@ export default {
|
||||
:label="$p.t('admission', 'anmeldundRtAm')"
|
||||
type="DatePicker"
|
||||
v-model="formData.anmeldedatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
|
||||
@@ -293,6 +293,7 @@ export default {
|
||||
:label="$p.t('person', 'geburtsdatum')"
|
||||
type="DatePicker"
|
||||
v-model="data.gebdatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="gebdatum"
|
||||
:clearable="false"
|
||||
no-today
|
||||
|
||||
@@ -103,6 +103,7 @@ export default {
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="formData.nachgereicht_am"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="nachgereicht_am"
|
||||
:label="$p.t('dokumente/nachreichungAm')"
|
||||
auto-apply
|
||||
|
||||
@@ -27,7 +27,7 @@ export default {
|
||||
return {
|
||||
filter: false,
|
||||
studiengang_kz: false,
|
||||
counterdate: new Date()
|
||||
counterdate: luxon.DateTime.now().setZone(FHC_JS_DATA_STORAGE_OBJECT.timezone).toISODate()
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -259,6 +259,7 @@ export default {
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="counterdate"
|
||||
model-type="yyyy-MM-dd"
|
||||
input-group
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
|
||||
@@ -79,6 +79,7 @@ export default {
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="data.buchungsdatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="buchungsdatum"
|
||||
:label="$p.t('konto/buchungsdatum')"
|
||||
:enable-time-picker="false"
|
||||
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
this.data = {
|
||||
buchungstyp_kurzbz: '',
|
||||
betrag: '-0.00',
|
||||
buchungsdatum: new Date(),
|
||||
buchungsdatum: luxon.DateTime.now().setZone(FHC_JS_DATA_STORAGE_OBJECT.timezone).toISODate(),
|
||||
buchungstext: '',
|
||||
mahnspanne: 30,
|
||||
studiensemester_kurzbz: this.currentSemester,
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
v-model="data.buchungsdatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="buchungsdatum"
|
||||
:label="$p.t('konto/buchungsdatum')"
|
||||
:enable-time-picker="false"
|
||||
|
||||
@@ -467,6 +467,7 @@ export default {
|
||||
:label="$p.t('ui', 'von')"
|
||||
type="DatePicker"
|
||||
v-model="formData.von"
|
||||
model-type="yyyy-MM-dd"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
@@ -501,6 +502,7 @@ export default {
|
||||
:label="$p.t('global', 'bis')"
|
||||
type="DatePicker"
|
||||
v-model="formData.bis"
|
||||
model-type="yyyy-MM-dd"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
text-input
|
||||
|
||||
@@ -325,6 +325,7 @@ export default {
|
||||
:label="$p.t('infocenter', 'zgvDatum')"
|
||||
type="DatePicker"
|
||||
v-model="data.zgvdatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="zgvdatum"
|
||||
no-today
|
||||
auto-apply
|
||||
@@ -389,6 +390,7 @@ export default {
|
||||
:label="$p.t('lehre', 'zgvMasterDatum')"
|
||||
type="DatePicker"
|
||||
v-model="data.zgvmadatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="zgvmadatum"
|
||||
no-today
|
||||
auto-apply
|
||||
@@ -454,6 +456,7 @@ export default {
|
||||
:label="$p.t('lehre', 'zgvDoktorDatum')"
|
||||
type="DatePicker"
|
||||
v-model="data.zgvdoktordatum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="zgvdoktordatum"
|
||||
no-today
|
||||
auto-apply
|
||||
|
||||
@@ -276,6 +276,7 @@ export default{
|
||||
container-class="mb-3"
|
||||
type="DatePicker"
|
||||
v-model="formData.datum"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="datum"
|
||||
:label="$p.t('global/datum')"
|
||||
auto-apply
|
||||
@@ -291,6 +292,7 @@ export default{
|
||||
container-class="mb-3"
|
||||
type="DatePicker"
|
||||
v-model="formData.bestaetigtam"
|
||||
model-type="yyyy-MM-dd"
|
||||
name="bestaetigtam"
|
||||
:label="$p.t('lehre/bestaetigt_am')"
|
||||
auto-apply
|
||||
@@ -306,13 +308,14 @@ export default{
|
||||
container-class="mb-3"
|
||||
type="DatePicker"
|
||||
v-model="formData.bewerbung_abgeschicktamum"
|
||||
model-type="yyyy-MM-dd HH:mm:ss"
|
||||
name="bewerbung_abgeschicktamum"
|
||||
:label="$p.t('lehre/bewerbung_abgeschickt_am')"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
:enable-time-picker="true"
|
||||
format="dd.MM.yyyy HH:mm:ss"
|
||||
text-input
|
||||
preview-format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy HH:mm:ss"
|
||||
:teleport="true"
|
||||
:disabled="bisLocked || !hasPrestudentstatusPermission"
|
||||
>
|
||||
|
||||
@@ -285,6 +285,7 @@ export default {
|
||||
uid="stv-list-new-gebdatum"
|
||||
name="gebdatum"
|
||||
v-model="formDataPerson['gebdatum']"
|
||||
model-type="yyyy-MM-dd"
|
||||
:disabled="!!person"
|
||||
@update:model-value="loadSuggestions"
|
||||
text-input
|
||||
|
||||
@@ -218,15 +218,23 @@ export const CoreFilterCmpt = {
|
||||
},
|
||||
columnsForFilter() {
|
||||
if (!this.filteredColumns || !this.datasetMetadata) return [];
|
||||
const localizedColumnTitles = this.tabulator.getLang().columns;
|
||||
|
||||
const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale;
|
||||
const filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] =
|
||||
isTabulatorLocalized && localizedColumnTitles[c.field]
|
||||
? localizedColumnTitles[c.field]
|
||||
: c.title;
|
||||
return a;
|
||||
}, {});
|
||||
|
||||
let filterTitles;
|
||||
if (isTabulatorLocalized) {
|
||||
const localizedColumnTitles = this.tabulator.getLang().columns;
|
||||
filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] = localizedColumnTitles[c.field];
|
||||
return a;
|
||||
}, {});
|
||||
} else {
|
||||
filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] = c.title;
|
||||
return a;
|
||||
}, {});
|
||||
}
|
||||
|
||||
return this.datasetMetadata.map((el) => ({
|
||||
...el,
|
||||
...{ title: filterTitles[el.name] },
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 48 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 79 KiB |
@@ -98,6 +98,7 @@ require_once('dbupdate_3.4/75888_reihungstest_mehrfachdurchfuehrung.php');
|
||||
require_once('dbupdate_3.4/76150_perm_other_lv_plan.php');
|
||||
require_once('dbupdate_3.4/68957_dashboard_bookmark_neue_Spalte_sort.php');
|
||||
require_once('dbupdate_3.4/68530_Dashboard_Cleanup.php');
|
||||
require_once('dbupdate_3.4/77757_widgets_berechtigungen.php');
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
/* Copyright (C) 2026 fhcomplete.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Beschreibung:
|
||||
* Dashboard Widgets: Verknüpfung einer (einzelnen) Berechtigung pro Widget.
|
||||
* Neue Spalte dashboard.tbl_widget.berechtigung_kurzbz mit FK auf
|
||||
* system.tbl_berechtigung. Ist die Spalte NULL, erfordert das Widget keine
|
||||
* gesonderte Berechtigung. Benutzer denen die verknüpfte Berechtigung fehlt,
|
||||
* bekommen das Widget nicht mehr zur Auswahl angezeigt bzw. sehen (falls bereits
|
||||
* am Dashboard) einen "Fehlende Berechtigung"-Screen.
|
||||
*/
|
||||
if (! defined('DB_NAME')) exit('No direct script access allowed');
|
||||
|
||||
// Add column dashboard.tbl_widget.berechtigung_kurzbz (FK => system.tbl_berechtigung)
|
||||
if ($result = @$db->db_query("
|
||||
SELECT 1
|
||||
FROM information_schema.columns
|
||||
WHERE table_schema = 'dashboard'
|
||||
AND table_name = 'tbl_widget'
|
||||
AND column_name = 'berechtigung_kurzbz';"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = "
|
||||
ALTER TABLE dashboard.tbl_widget
|
||||
ADD COLUMN berechtigung_kurzbz VARCHAR(32) NULL;
|
||||
|
||||
ALTER TABLE dashboard.tbl_widget
|
||||
ADD CONSTRAINT tbl_widget_berechtigung_fk
|
||||
FOREIGN KEY (berechtigung_kurzbz)
|
||||
REFERENCES system.tbl_berechtigung (berechtigung_kurzbz)
|
||||
ON UPDATE CASCADE ON DELETE SET NULL;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
{
|
||||
echo '<strong>dashboard.tbl_widget: '.$db->db_last_error().'</strong><br>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'dashboard.tbl_widget: Spalte berechtigung_kurzbz (FK system.tbl_berechtigung) hinzugefuegt<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32514,6 +32514,86 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'anwKontrolle',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anwesenheitskontrolle',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Attendance check',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'anwKontrolleOeffnen',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Anwesenheitskontrolle öffnen',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Open attendance check',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'anwKeinUnterricht',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Kein Unterricht in diesem Zeitraum',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'No lessons in this period',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
'phrase' => 'anwJetzt',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Jetzt',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'Now',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'anwesenheiten',
|
||||
'category' => 'global',
|
||||
@@ -48681,6 +48761,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'dashboard',
|
||||
'phrase' => 'widget_missing_permission',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => 'Ihnen fehlt die erforderliche Berechtigung, um dieses Widget anzuzeigen.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => 'You do not have the permission required to display this widget.',
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
// CIS4 phrases from legacy code end
|
||||
// FHC4 Phrases Abschlusspruefung
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user