mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e91f8e5ca4 | |||
| c765c3c40a | |||
| bbb4f8a01c | |||
| fdbb93a5c5 | |||
| b7e48633ab | |||
| 04dc1eb07b | |||
| 50b229090b | |||
| 2d27a998c4 | |||
| 090e535466 | |||
| c4d35181db | |||
| 0ac6ef4599 | |||
| cb60ddcc94 | |||
| bd4ced9559 | |||
| a04d2acb86 | |||
| de2aabf00b | |||
| 685fc69e5d | |||
| 26db4a5e7a | |||
| 21d80905a2 | |||
| 298dbbf400 | |||
| ba6224bc78 |
@@ -0,0 +1,22 @@
|
||||
<?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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (!defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
$config['stv'] = "menu/StvMenuLib";
|
||||
@@ -0,0 +1,58 @@
|
||||
<?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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/**
|
||||
* This controller operates between (interface) the JS (GUI) and the back-end
|
||||
* Provides data to the ajax get calls about menues
|
||||
* This controller works with JSON calls on the HTTP GET or POST and the output is always JSON
|
||||
*/
|
||||
class Menu extends FHCAPI_Controller
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$permissions = [];
|
||||
$router = load_class('Router');
|
||||
// TODO(chris): permission
|
||||
$permissions[$router->method] = ['admin:r', 'assistenz:r'];
|
||||
parent::__construct($permissions);
|
||||
|
||||
// Load Config
|
||||
$this->config->load('menubuilder');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $method
|
||||
* @param array $params (optional)
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function _remap($method, $params = [])
|
||||
{
|
||||
$this->load->library($this->config->item($method), null, 'menulib');
|
||||
|
||||
if (!$this->menulib)
|
||||
show_404();
|
||||
|
||||
$submenu = $this->menulib->build($params);
|
||||
|
||||
$this->terminateWithSuccess($submenu);
|
||||
}
|
||||
}
|
||||
@@ -78,52 +78,32 @@ class Dokumente extends FHCAPI_Controller
|
||||
$this->terminateWithError($this->p->t('ui', 'errorMissingValue', ['value' => 'Studiengang_kz']), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
$resultPreDoc = $this->_getPrestudentDokumente($prestudent_id);
|
||||
|
||||
$arrayAccepted = [];
|
||||
$person_id = $this->_getPersonId($prestudent_id);
|
||||
|
||||
$docNames = array_map(function ($item) {
|
||||
return $item->dokument_kurzbz;
|
||||
}, $resultPreDoc);
|
||||
$mergedArray = [];
|
||||
|
||||
foreach($docNames as $doc)
|
||||
foreach ($resultPreDoc as $pre)
|
||||
{
|
||||
$result = $this->AkteModel->getAktenFAS($person_id, $doc, $studiengang_kz, $prestudent_id, true);
|
||||
$result = $this->AkteModel->getAktenFAS($person_id, $pre->dokument_kurzbz, $studiengang_kz, $prestudent_id, true);
|
||||
|
||||
if (isError($result))
|
||||
{
|
||||
return $this->terminateWithError($result, self::ERROR_TYPE_GENERAL);
|
||||
}
|
||||
|
||||
if (hasData($result))
|
||||
{
|
||||
$data = getData($result);
|
||||
foreach ($data as $value)
|
||||
foreach (getData($result) as $doc)
|
||||
{
|
||||
array_push($arrayAccepted, $value);
|
||||
$merged = clone $doc;
|
||||
$merged->docdatum = $pre->docdatum;
|
||||
$merged->insertvonma = $pre->insertvonma;
|
||||
$merged->bezeichnung = $pre->bezeichnung;
|
||||
$mergedArray[] = $merged;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Mapping with document_kurzbz
|
||||
$preDocMap = [];
|
||||
foreach ($resultPreDoc as $pre) {
|
||||
$preDocMap[$pre->dokument_kurzbz] = $pre;
|
||||
}
|
||||
|
||||
$mergedArray = [];
|
||||
foreach ($arrayAccepted as $doc) {
|
||||
$merged = clone $doc;
|
||||
|
||||
if (isset($preDocMap[$doc->dokument_kurzbz])) {
|
||||
$merged->docdatum = $preDocMap[$doc->dokument_kurzbz]->docdatum;
|
||||
$merged->insertvonma = $preDocMap[$doc->dokument_kurzbz]->insertvonma;
|
||||
$merged->bezeichnung = $preDocMap[$doc->dokument_kurzbz]->bezeichnung;
|
||||
} else {
|
||||
$merged->akzeptiertdatum = null;
|
||||
$merged->akzeptiertvon = null;
|
||||
else
|
||||
{
|
||||
$mergedArray[] = $pre;
|
||||
}
|
||||
|
||||
$mergedArray[] = $merged;
|
||||
}
|
||||
|
||||
$this->terminateWithSuccess($mergedArray);
|
||||
|
||||
@@ -48,7 +48,8 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
// Load language phrases
|
||||
$this->loadPhrases([
|
||||
'konto'
|
||||
'konto',
|
||||
'lehre'
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -112,7 +113,7 @@ class Konto extends FHCAPI_Controller
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getBuchungstypen()
|
||||
public function getBuchungstypen($studiensemester_kurzbz = null)
|
||||
{
|
||||
$this->load->model('crm/Buchungstyp_model', 'BuchungstypModel');
|
||||
|
||||
@@ -122,6 +123,7 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
$data = $this->getDataOrTerminateWithError($result);
|
||||
|
||||
$this->_getOEHBeitrag($data, $studiensemester_kurzbz);
|
||||
$this->terminateWithSuccess($data);
|
||||
}
|
||||
|
||||
@@ -494,4 +496,43 @@ class Konto extends FHCAPI_Controller
|
||||
|
||||
$this->terminateWithSuccess();
|
||||
}
|
||||
|
||||
private function _getOEHBeitrag(&$data, $studiensemester_kurzbz = null)
|
||||
{
|
||||
if (is_null($studiensemester_kurzbz))
|
||||
{
|
||||
$this->load->library('VariableLib', ['uid' => getAuthUID()]);
|
||||
$studiensemester_akt = $this->variablelib->getVar('semester_aktuell');
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->load->model('organisation/Studiensemester_model', 'StudiensemesterModel');
|
||||
if ($this->StudiensemesterModel->isValidStudiensemester($studiensemester_kurzbz))
|
||||
$studiensemester_akt = $studiensemester_kurzbz;
|
||||
else
|
||||
$this->terminateWithError($this->p->t('lehre', 'error_noStudiensemester'));
|
||||
}
|
||||
|
||||
$this->load->model('codex/Oehbeitrag_model', 'OehbeitragModel');
|
||||
$oehBeitrag = $this->OehbeitragModel->getByStudiensemester($studiensemester_akt);
|
||||
|
||||
$oehStandardbetrag = null;
|
||||
if (hasData($oehBeitrag))
|
||||
{
|
||||
$oeh = getData($oehBeitrag)[0];
|
||||
$summe = ($oeh->studierendenbeitrag + $oeh->versicherung) * -1;
|
||||
$oehStandardbetrag = number_format((float)$summe, 2, '.', '');
|
||||
}
|
||||
|
||||
if ($oehStandardbetrag !== null)
|
||||
{
|
||||
$data = array_map(function ($buchungstyp) use ($oehStandardbetrag) {
|
||||
if (isset($buchungstyp->buchungstyp_kurzbz) && (strtolower($buchungstyp->buchungstyp_kurzbz) === 'oeh'))
|
||||
{
|
||||
$buchungstyp->standardbetrag = $oehStandardbetrag;
|
||||
}
|
||||
return $buchungstyp;
|
||||
}, $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ abstract class Notiz_Controller extends FHCAPI_Controller
|
||||
$notiz_id = $this->input->post('notiz_id');
|
||||
|
||||
$this->NotizModel->addSelect('campus.tbl_dms_version.*');
|
||||
$this->NotizModel->addSelect($this->NotizModel->escape(base_url('content/notizdokdownload.php?id=')) . ' || public.tbl_notiz_dokument.dms_id AS preview');
|
||||
|
||||
$this->NotizModel->addJoin('public.tbl_notiz_dokument', 'ON (public.tbl_notiz_dokument.notiz_id = public.tbl_notiz.notiz_id)');
|
||||
$this->NotizModel->addJoin('campus.tbl_dms_version', 'ON (public.tbl_notiz_dokument.dms_id = campus.tbl_dms_version.dms_id)');
|
||||
|
||||
+49
-1
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/'.EXT_FKT_PATH.'/generateZahlungsreferenz.inc.php');
|
||||
require_once(dirname(__FILE__).'/variable.class.php');
|
||||
|
||||
class konto extends basis_db
|
||||
{
|
||||
@@ -432,6 +433,8 @@ class konto extends basis_db
|
||||
|
||||
$qry.=" ORDER BY beschreibung";
|
||||
|
||||
$oehBeitrag = $this->_getOEHBeitrag();
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
@@ -440,7 +443,15 @@ class konto extends basis_db
|
||||
|
||||
$typ->buchungstyp_kurzbz = $row->buchungstyp_kurzbz;
|
||||
$typ->beschreibung = $row->beschreibung;
|
||||
$typ->standardbetrag = $row->standardbetrag;
|
||||
if (strtolower($typ->buchungstyp_kurzbz) === 'oeh' && $oehBeitrag)
|
||||
{
|
||||
$typ->standardbetrag = $oehBeitrag;
|
||||
}
|
||||
else
|
||||
{
|
||||
$typ->standardbetrag = $row->standardbetrag;
|
||||
}
|
||||
|
||||
$typ->standardtext = $row->standardtext;
|
||||
$typ->credit_points = $row->credit_points;
|
||||
$typ->aktiv = $this->db_parse_bool($row->aktiv);
|
||||
@@ -990,6 +1001,43 @@ class konto extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private function _getOEHBeitrag()
|
||||
{
|
||||
if(!is_user_logged_in())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$variablen_obj = new variable();
|
||||
$variablen_obj->loadVariables(get_uid());
|
||||
|
||||
$qry = "WITH semstart AS (
|
||||
SELECT start FROM public.tbl_studiensemester
|
||||
WHERE studiensemester_kurzbz = '". $this->db_escape($variablen_obj->variable->semester_aktuell) . "'
|
||||
)
|
||||
SELECT * FROM bis.tbl_oehbeitrag oehb
|
||||
JOIN public.tbl_studiensemester semvon ON oehb.von_studiensemester_kurzbz = semvon.studiensemester_kurzbz
|
||||
LEFT JOIN public.tbl_studiensemester sembis ON oehb.bis_studiensemester_kurzbz = sembis.studiensemester_kurzbz
|
||||
JOIN semstart ON semstart.start::date >= semvon.start::date AND (sembis.studiensemester_kurzbz IS NULL OR semstart.start::date <= sembis.start::date)
|
||||
ORDER BY semvon.start
|
||||
LIMIT 1";
|
||||
|
||||
if ($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$summe = ($row->studierendenbeitrag + $row->versicherung) * -1;
|
||||
return number_format((float)$summe, 2, '.', '');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler bei der Abfrage aufgetreten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -197,10 +197,6 @@ html.fs_huge {
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.tiny-90 div.tox.tox-tinymce {
|
||||
height: 90% !important;
|
||||
}
|
||||
|
||||
/* slim begin */
|
||||
.stv .form-label {
|
||||
margin-bottom: .15rem;
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
/**
|
||||
* 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 3 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, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export default {
|
||||
get(config, path = '') {
|
||||
return {
|
||||
method: 'get',
|
||||
url: '/api/frontend/v1/menu/' + config + '/' + path
|
||||
};
|
||||
},
|
||||
// TODO(chris): handle favorites per config
|
||||
favorites: {
|
||||
get() {
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/favorites'
|
||||
};
|
||||
},
|
||||
set(favorites) {
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/stv/favorites/set',
|
||||
params: { favorites }
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -38,6 +38,10 @@ export default {
|
||||
};
|
||||
},
|
||||
insert(params) {
|
||||
if(params.betrag)
|
||||
{
|
||||
params.betrag = params.betrag.replace(',', '.');
|
||||
}
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/stv/konto/insert',
|
||||
@@ -52,6 +56,10 @@ export default {
|
||||
};
|
||||
},
|
||||
edit(params) {
|
||||
if(params.betrag)
|
||||
{
|
||||
params.betrag = params.betrag.replace(',', '.');
|
||||
}
|
||||
return {
|
||||
method: 'post',
|
||||
url: 'api/frontend/v1/stv/konto/update',
|
||||
@@ -65,10 +73,14 @@ export default {
|
||||
params: { buchungsnr }
|
||||
};
|
||||
},
|
||||
getBuchungstypen() {
|
||||
getBuchungstypen(studiensemester_kurzbz) {
|
||||
let url = 'api/frontend/v1/stv/konto/getBuchungstypen'
|
||||
if (!!studiensemester_kurzbz)
|
||||
url = url + '/' + encodeURIComponent(studiensemester_kurzbz);
|
||||
|
||||
return {
|
||||
method: 'get',
|
||||
url: 'api/frontend/v1/stv/konto/getBuchungstypen'
|
||||
url: url
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,362 @@
|
||||
import MenuEntry from './Menu/Entry.js';
|
||||
|
||||
import dragClick from '../../directives/dragClick.js';
|
||||
|
||||
import ApiMenu from '../../api/factory/menu.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PvTreetable: primevue.treetable,
|
||||
PvColumn: primevue.column,
|
||||
MenuEntry
|
||||
},
|
||||
directives: {
|
||||
dragClick
|
||||
},
|
||||
emits: [
|
||||
'selectEntry',
|
||||
'drop'
|
||||
],
|
||||
props: {
|
||||
config: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
preselectedKey: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
nodes: [],
|
||||
selectedKey: [],
|
||||
expandedKeys: {},
|
||||
filters: {}, // TODO(chris): filter only 1st level?
|
||||
favorites: {on: false, list: []}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredNodes() {
|
||||
if (this.favorites.on)
|
||||
return this.nodes.filter(node => this.favorites.list.includes(node.data.path));
|
||||
|
||||
return this.nodes;
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
preselectedKey(newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setPreselection();
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
reloadNodesWithProp(prop, nodes = undefined) {
|
||||
if (!nodes)
|
||||
nodes = this.nodes;
|
||||
|
||||
nodes.forEach(node => {
|
||||
if (node.data[prop]) {
|
||||
// reload
|
||||
delete node.children;
|
||||
this.onExpandTreeNode(node);
|
||||
} else if (node.children) {
|
||||
this.reloadNodesWithProp(prop, node.children);
|
||||
}
|
||||
});
|
||||
},
|
||||
findNodeByKey(key, arr) {
|
||||
if (!arr)
|
||||
arr = this.nodes;
|
||||
let res = arr.filter(n => n.key == key);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
res = arr.map(n => n.children ? this.findNodeByKey(key, n.children) : null).filter(a => a);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
return null;
|
||||
},
|
||||
async onExpandTreeNode(node) {
|
||||
if (!node.children) {
|
||||
if (node.data.path) {
|
||||
/**
|
||||
* NOTE(chris): activeEl is for keyboard navigation to
|
||||
* prevent the focus jumping down to the next parent
|
||||
* instead of the current submenu entry (which is not yet
|
||||
* loaded)
|
||||
*/
|
||||
let activeEl = null;
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(() => {
|
||||
activeEl = document.activeElement;
|
||||
});
|
||||
});
|
||||
this.loading = true;
|
||||
|
||||
return this.$api
|
||||
.call(ApiMenu.get(this.config, node.data.path))
|
||||
.then(result => {
|
||||
const subNodes = result.data.map(this.mapResultToTreeData);
|
||||
const realNode = this.findNodeByKey(node.key);
|
||||
if (realNode)
|
||||
realNode.children = subNodes;
|
||||
else
|
||||
node.children = subNodes; // NOTE(chris): fallback should never be the case
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (activeEl != document.activeElement)
|
||||
return;
|
||||
|
||||
let treeitem = this.$refs.tree.$el.querySelector('[data-tree-item-key="' + node.key + '"]');
|
||||
if (!treeitem)
|
||||
return;
|
||||
|
||||
treeitem = treeitem.closest('[role="row"]');
|
||||
|
||||
if (!treeitem)
|
||||
return;
|
||||
|
||||
treeitem.dispatchEvent(new KeyboardEvent('keydown', {
|
||||
code: 'ArrowDown',
|
||||
key: 'ArrowDown'
|
||||
}));
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelectTreeNode(node) {
|
||||
this.$emit('selectEntry', node.data);
|
||||
},
|
||||
mapNodesToNoSemReloadNodes(result, node) {
|
||||
if (node.data.no_sem_reload)
|
||||
result.push(node);
|
||||
if (node.children)
|
||||
result = node.children.reduce(this.mapNodesToNoSemReloadNodes, result);
|
||||
return result;
|
||||
},
|
||||
mapResultToTreeData(el) {
|
||||
const cp = {
|
||||
key: ("" + el.path).replace(/\//g, '-'),
|
||||
data: el,
|
||||
label: el.name // TODO(chris): phrase
|
||||
};
|
||||
|
||||
if (el.children)
|
||||
cp.children = el.children.map(this.mapResultToTreeData);
|
||||
else
|
||||
cp.leaf = el.leaf || false;
|
||||
|
||||
return cp;
|
||||
},
|
||||
async setPreselection()
|
||||
{
|
||||
if (!this.preselectedKey)
|
||||
{
|
||||
this.selectedKey = null;
|
||||
return;
|
||||
}
|
||||
|
||||
let rawKey = this.preselectedKey
|
||||
|
||||
if (!rawKey || typeof rawKey !== 'string')
|
||||
return;
|
||||
|
||||
const parts = this.preselectedKey.split('/');
|
||||
let currentKey = parts[0];
|
||||
let currentNode = this.findNodeByKey(currentKey);
|
||||
|
||||
if (!currentNode)
|
||||
return;
|
||||
|
||||
if(this.selectedKey)
|
||||
{
|
||||
const currentSelectedKey = Object.keys(this.selectedKey).find(Boolean);
|
||||
if (currentSelectedKey) {
|
||||
if (currentSelectedKey == currentKey)
|
||||
return;
|
||||
/**
|
||||
* Do not select a new entry if the current is a child of the new one.
|
||||
* This happens if a child entry of a new stg is selected and the router
|
||||
* tries to select the stg root entry (because subtrees do not have
|
||||
* routes yet)
|
||||
*/
|
||||
const isChild = this.findNodeByKey(
|
||||
currentSelectedKey,
|
||||
currentNode.children || []
|
||||
);
|
||||
if (isChild)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 1; i < parts.length; i++)
|
||||
{
|
||||
this.expandedKeys[currentNode.key] = true;
|
||||
|
||||
await this.onExpandTreeNode(currentNode);
|
||||
|
||||
currentKey += '-' + parts[i];
|
||||
currentNode = this.findNodeByKey(currentKey);
|
||||
|
||||
if (!currentNode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.selectedKey = {[currentNode.key]: true};
|
||||
this.onSelectTreeNode(currentNode);
|
||||
},
|
||||
async toggleTreeNode(node) {
|
||||
if (this.expandedKeys[node.key]) {
|
||||
delete this.expandedKeys[node.key];
|
||||
} else if (!node.leaf) {
|
||||
await this.onExpandTreeNode(node);
|
||||
this.expandedKeys[node.key] = true;
|
||||
}
|
||||
},
|
||||
filterFav() {
|
||||
this.favorites.on = !this.favorites.on;
|
||||
this.$api
|
||||
.call(ApiMenu.favorites.set(
|
||||
JSON.stringify(this.favorites)
|
||||
));
|
||||
},
|
||||
markFav(key) {
|
||||
let index = this.favorites.list.indexOf(key.data.path + '');
|
||||
|
||||
if (index != -1) {
|
||||
this.favorites.list.splice(index, 1);
|
||||
} else {
|
||||
this.favorites.list.push(key.data.path + '');
|
||||
}
|
||||
|
||||
this.$api
|
||||
.call(ApiMenu.favorites.set(
|
||||
JSON.stringify(this.favorites)
|
||||
));
|
||||
},
|
||||
unsetFavFocus(e) {
|
||||
if (e.target.dataset?.linkFavAdd !== undefined) {
|
||||
e.target.tabIndex = -1;
|
||||
} else {
|
||||
let items = e.target.querySelectorAll('[data-link-fav-add]:not([tabindex="-1"])');
|
||||
items.forEach(el => el.tabIndex = document.activeElement == el ? 0 : -1);
|
||||
}
|
||||
},
|
||||
setFavFocus(e) {
|
||||
if (e.target.dataset?.linkFavAdd !== undefined) {
|
||||
e.target.tabIndex = 0;
|
||||
} else {
|
||||
let items = e.target.querySelectorAll('[data-link-fav-add][tabindex="-1"]');
|
||||
items.forEach(el => el.tabIndex = 0);
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$api
|
||||
.call(ApiMenu.get(this.config))
|
||||
.then(result => {
|
||||
this.nodes = result.data.map(el => {
|
||||
el.root = true;
|
||||
return this.mapResultToTreeData(el);
|
||||
});
|
||||
this.setPreselection();
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$api
|
||||
.call(ApiMenu.favorites.get())
|
||||
.then(result => {
|
||||
if (result.data) {
|
||||
this.favorites = JSON.parse(result.data);
|
||||
}
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
template: /* html */`
|
||||
<pv-treetable
|
||||
ref="tree"
|
||||
v-model:expanded-keys="expandedKeys"
|
||||
v-model:selection-keys="selectedKey"
|
||||
class="menu p-treetable-sm"
|
||||
:value="filteredNodes"
|
||||
selection-mode="single"
|
||||
scrollable
|
||||
scroll-height="flex"
|
||||
:filters="filters"
|
||||
@node-expand="onExpandTreeNode"
|
||||
@node-select="onSelectTreeNode"
|
||||
@focusin="setFavFocus"
|
||||
@focusout="unsetFavFocus"
|
||||
>
|
||||
<pv-column
|
||||
field="name"
|
||||
expander
|
||||
class="text-break"
|
||||
>
|
||||
<template #header>
|
||||
<div class="text-right">
|
||||
<div class="p-input-icon-left">
|
||||
<i class="pi pi-search"></i>
|
||||
<input
|
||||
type="text"
|
||||
v-model="filters['global']"
|
||||
class="form-control ps-5"
|
||||
placeholder="Search"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ node }">
|
||||
<menu-entry
|
||||
:node="node"
|
||||
:data-tree-item-key="node.key"
|
||||
v-drag-click="() => toggleTreeNode(node)"
|
||||
@drop="$emit('drop', $event)"
|
||||
/>
|
||||
</template>
|
||||
</pv-column>
|
||||
<pv-column
|
||||
field="fav"
|
||||
class="flex-shrink-0 flex-grow-0"
|
||||
header-class="flex-shrink-0 flex-grow-0"
|
||||
>
|
||||
<template #header>
|
||||
<a
|
||||
v-if="favorites.on || favorites.list.length"
|
||||
href="#"
|
||||
@click.prevent="filterFav"
|
||||
>
|
||||
<i
|
||||
:class="favorites.on ? 'fa-solid' : 'fa-regular'"
|
||||
class="fa-star"
|
||||
></i>
|
||||
</a>
|
||||
</template>
|
||||
<template #body="{ node }">
|
||||
<a
|
||||
v-if="node.data.root"
|
||||
href="#"
|
||||
tabindex="-1"
|
||||
data-link-fav-add
|
||||
@click.prevent="markFav(node)"
|
||||
@keydown.enter.stop.prevent="markFav(node)"
|
||||
>
|
||||
<i
|
||||
:class="favorites.list.includes(node.data.path + '') ? 'fa-solid' : 'fa-regular'"
|
||||
class="fa-star"
|
||||
></i>
|
||||
</a>
|
||||
</template>
|
||||
</pv-column>
|
||||
<pv-column field="search" class="d-none"></pv-column>
|
||||
</pv-treetable>`
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
import drop from '../../../directives/drop.js';
|
||||
|
||||
export default {
|
||||
directives: {
|
||||
drop
|
||||
},
|
||||
emits: [
|
||||
'drop'
|
||||
],
|
||||
props: {
|
||||
node: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
name() {
|
||||
if (Array.isArray(this.node.data.name))
|
||||
return this.$p.t(this.node.data.name);
|
||||
|
||||
return this.node.data.name;
|
||||
},
|
||||
title() {
|
||||
if (!this.node.data.title)
|
||||
return this.name;
|
||||
|
||||
if (Array.isArray(this.node.data.title))
|
||||
return this.$p.t(this.node.data.title);
|
||||
|
||||
return this.node.data.title;
|
||||
},
|
||||
dropConfig() {
|
||||
if (!this.node.data?.droplink)
|
||||
return null;
|
||||
|
||||
const allowed = [ ...this.node.data.droplink ];
|
||||
const effect = allowed.shift();
|
||||
|
||||
return { effect, allowed };
|
||||
}
|
||||
},
|
||||
template: /* html */`
|
||||
<span
|
||||
class="menu-entry d-flex align-items-center w-100 h-100"
|
||||
:title="title"
|
||||
v-drop:[dropConfig]="(evt, data) => $emit('drop', { drop: node.data, drag: data })"
|
||||
>
|
||||
{{ name }}
|
||||
</span>`
|
||||
};
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
const vm = this;
|
||||
tinymce.init({
|
||||
target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
|
||||
//height: 800,
|
||||
min_height: 300,
|
||||
//plugins: ['lists'],
|
||||
toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | link',
|
||||
plugins: 'link',
|
||||
@@ -313,7 +313,7 @@ export default {
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<form-form class="row g-3 mt-2 h-100" ref="formMessage">
|
||||
<form-form class="row g-3 mt-2 align-content-start" ref="formMessage">
|
||||
|
||||
<div class="row mb-3">
|
||||
|
||||
@@ -338,7 +338,7 @@ export default {
|
||||
</div>
|
||||
|
||||
<!--Tiny MCE-->
|
||||
<div class="row mb-3 h-100 tiny-90">
|
||||
<div class="row mb-3 tiny-90">
|
||||
<form-input
|
||||
ref="editor"
|
||||
:label="$p.t('global','nachricht') + ' *'"
|
||||
|
||||
@@ -62,7 +62,7 @@ export default {
|
||||
const vm = this;
|
||||
tinymce.init({
|
||||
target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component
|
||||
//height: 800,
|
||||
min_height: 300,
|
||||
//plugins: ['lists'],
|
||||
toolbar: 'styleselect | bold italic underline | alignleft aligncenter alignright alignjustify | link',
|
||||
plugins: 'link',
|
||||
|
||||
@@ -30,6 +30,7 @@ export default {
|
||||
personId: null,
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '400',
|
||||
arePhrasesLoaded: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -195,7 +196,7 @@ export default {
|
||||
],
|
||||
formatter: (cell, formatterParams) => {
|
||||
const key = formatterParams[cell.getValue()];
|
||||
return this.$p.t('messages', key);
|
||||
return this.$p?.t?.('messages', key) || key;
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -305,8 +306,6 @@ export default {
|
||||
{
|
||||
event: 'tableBuilt',
|
||||
handler: async() => {
|
||||
await this.$p.loadCategory(['global', 'person', 'stv', 'messages', 'ui', 'notiz']);
|
||||
|
||||
const setHeader = (field, text) => {
|
||||
const col = this.$refs.table.tabulator.getColumn(field);
|
||||
if (!col) return;
|
||||
@@ -357,6 +356,12 @@ export default {
|
||||
});*/
|
||||
},
|
||||
created(){
|
||||
this.$p
|
||||
.loadCategory(['global', 'person', 'stv', 'messages', 'ui', 'notiz'])
|
||||
.then(() => {
|
||||
this.arePhrasesLoaded = true;
|
||||
});
|
||||
|
||||
if(this.typeId != 'person_id' && Array.isArray(this.id) && this.id.length === 1) {
|
||||
const params = {
|
||||
id: this.id,
|
||||
@@ -381,6 +386,7 @@ export default {
|
||||
<!--table-->
|
||||
<div class="col-sm-6 pt-1">
|
||||
<core-filter-cmpt
|
||||
v-if="arePhrasesLoaded"
|
||||
ref="table"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
@@ -413,6 +419,7 @@ export default {
|
||||
<div class="col-sm-12 pt-6">
|
||||
<core-filter-cmpt
|
||||
ref="table"
|
||||
v-if="arePhrasesLoaded"
|
||||
:tabulator-options="tabulatorOptions"
|
||||
:tabulator-events="tabulatorEvents"
|
||||
table-only
|
||||
|
||||
@@ -273,10 +273,10 @@ export default {
|
||||
},
|
||||
onSelectVerband({ link, studiengang_kz, semester, orgform_kurzbz }) {
|
||||
let urlpath = String(link);
|
||||
if (!urlpath.match(/\/prestudent/))
|
||||
/*if (!urlpath.match(/\/prestudent/))
|
||||
{
|
||||
urlpath = 'CURRENT_SEMESTER' + '/' + urlpath;
|
||||
}
|
||||
}*/
|
||||
this.$refs.stvList.updateUrl(ApiStv.students.verband(urlpath));
|
||||
|
||||
this.studiengangKz = studiengang_kz;
|
||||
|
||||
@@ -83,6 +83,8 @@ export default {
|
||||
});
|
||||
},
|
||||
open() {
|
||||
|
||||
this.getBuchungstypen(this.currentSemester);
|
||||
this.data = {
|
||||
buchungstyp_kurzbz: '',
|
||||
betrag: '-0.00',
|
||||
@@ -105,7 +107,7 @@ export default {
|
||||
const text = typ.standardtext || '';
|
||||
const creditpoints = typ.credit_points || '';
|
||||
|
||||
if (!this.data.betrag || this.data.betrag == '-0.00')
|
||||
if (!this.data.betrag || this.data.betrag == '-0.00' || this.data.betrag !== amount)
|
||||
this.data.betrag = amount;
|
||||
|
||||
if (!this.data.buchungstext)
|
||||
@@ -113,7 +115,18 @@ export default {
|
||||
|
||||
if (this.config.showCreditpoints && (this.data.credit_points == '0.00' || this.data.credit_points === null))
|
||||
this.data.credit_points = creditpoints;
|
||||
}
|
||||
},
|
||||
getBuchungstypen(studiensemester_kurzbz)
|
||||
{
|
||||
this.$api
|
||||
.call(ApiKonto.getBuchungstypen(studiensemester_kurzbz))
|
||||
.then(result => {
|
||||
this.lists.buchungstypen = result.data;
|
||||
if (this.data.buchungstyp_kurzbz)
|
||||
this.checkDefaultBetrag(this.data.buchungstyp_kurzbz);
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
},
|
||||
template: `
|
||||
<core-form ref="form" class="stv-details-konto-edit" @submit.prevent="save">
|
||||
@@ -166,6 +179,7 @@ export default {
|
||||
<form-input
|
||||
type="select"
|
||||
v-model="data.studiensemester_kurzbz"
|
||||
@change="getBuchungstypen(data.studiensemester_kurzbz)"
|
||||
name="studiensemester_kurzbz"
|
||||
:label="$p.t('lehre/studiensemester')"
|
||||
>
|
||||
|
||||
@@ -1,17 +1,11 @@
|
||||
import drop from '../../../directives/drop.js';
|
||||
import dragClick from '../../../directives/dragClick.js';
|
||||
import BaseMenu from '../../Base/Menu.js';
|
||||
|
||||
import ApiStvGroups from '../../../api/factory/stv/group.js';
|
||||
import ApiStvDetails from '../../../api/factory/stv/details.js';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
PvTreetable: primevue.treetable,
|
||||
PvColumn: primevue.column
|
||||
},
|
||||
directives: {
|
||||
drop,
|
||||
dragClick
|
||||
BaseMenu
|
||||
},
|
||||
inject: {
|
||||
$reloadList: {
|
||||
@@ -33,230 +27,22 @@ export default {
|
||||
'selectVerband'
|
||||
],
|
||||
props: {
|
||||
endpoint: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
preselectedKey: {
|
||||
type: String,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
nodes: [],
|
||||
selectedKey: [],
|
||||
expandedKeys: {},
|
||||
filters: {}, // TODO(chris): filter only 1st level?
|
||||
favorites: {on: false, list: []}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
filteredNodes() {
|
||||
if (this.favorites.on)
|
||||
return this.nodes.filter(node => this.favorites.list.includes(node.key));
|
||||
|
||||
return this.nodes;
|
||||
},
|
||||
noSemReloadNodes() {
|
||||
return this.nodes.reduce(this.mapNodesToNoSemReloadNodes, []);
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'preselectedKey': function (newVal, oldVal) {
|
||||
if (newVal !== oldVal) {
|
||||
this.setPreselection();
|
||||
}
|
||||
},
|
||||
'appConfig.number_displayed_past_studiensemester'(newVal, oldVal) {
|
||||
if (oldVal !== undefined) {
|
||||
this.noSemReloadNodes.forEach(node => {
|
||||
delete node.children;
|
||||
this.onExpandTreeNode(node);
|
||||
});
|
||||
if (oldVal !== undefined && this.$refs.menu) {
|
||||
this.$refs.menu.reloadNodesWithProp('no_sem_reload');
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
findNodeByKey(key, arr) {
|
||||
if (!arr)
|
||||
arr = this.nodes;
|
||||
let res = arr.filter(n => n.key == key);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
res = arr.map(n => n.children ? this.findNodeByKey(key, n.children) : null).filter(a => a);
|
||||
if (res.length)
|
||||
return res.pop();
|
||||
return null;
|
||||
},
|
||||
async onExpandTreeNode(node) {
|
||||
if (!node.children) {
|
||||
if (node.data.link) {
|
||||
let activeEl = null;
|
||||
this.$nextTick(() => {
|
||||
this.$nextTick(() => {
|
||||
activeEl = document.activeElement;
|
||||
});
|
||||
});
|
||||
this.loading = true;
|
||||
|
||||
return this.$api
|
||||
.call(this.endpoint.get(node.data.link))
|
||||
.then(result => result.data)
|
||||
.then(result => {
|
||||
const subNodes = result.map(this.mapResultToTreeData);
|
||||
const realNode = this.findNodeByKey(node.key);
|
||||
if (realNode)
|
||||
realNode.children = subNodes;
|
||||
else
|
||||
node.children = subNodes; // NOTE(chris): fallback should never be the case
|
||||
|
||||
let treeitem = this.$refs.tree.$el.querySelector('[data-tree-item-key="' + node.key + '"]');
|
||||
treeitem = treeitem.closest('[role="row"]');
|
||||
|
||||
this.$nextTick(() => {
|
||||
if (activeEl == document.activeElement)
|
||||
treeitem.dispatchEvent(new KeyboardEvent('keydown', {
|
||||
code: 'ArrowDown',
|
||||
key: 'ArrowDown'
|
||||
}));
|
||||
});
|
||||
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
}
|
||||
},
|
||||
onSelectTreeNode(node) {
|
||||
if (node.data.link)
|
||||
this.$emit('selectVerband', {link: node.data.link, studiengang_kz: node.data.stg_kz, semester: node.data.semester, orgform_kurzbz: node.data.orgform_kurzbz});
|
||||
},
|
||||
mapNodesToNoSemReloadNodes(result, node) {
|
||||
if (node.data.no_sem_reload)
|
||||
result.push(node);
|
||||
if (node.children)
|
||||
result = node.children.reduce(this.mapNodesToNoSemReloadNodes, result);
|
||||
return result;
|
||||
},
|
||||
mapResultToTreeData(el) {
|
||||
const cp = {
|
||||
key: ("" + el.link).replace('/', '-'),
|
||||
data: el,
|
||||
label: el.name
|
||||
};
|
||||
|
||||
if (el.children)
|
||||
cp.children = el.children.map(this.mapResultToTreeData);
|
||||
else
|
||||
cp.leaf = el.leaf || false;
|
||||
|
||||
return cp;
|
||||
},
|
||||
filterFav() {
|
||||
this.favorites.on = !this.favorites.on;
|
||||
this.$api
|
||||
.call(this.endpoint.favorites.set(
|
||||
JSON.stringify(this.favorites)
|
||||
));
|
||||
},
|
||||
markFav(key) {
|
||||
let index = this.favorites.list.indexOf(key.data.link + '');
|
||||
|
||||
if (index != -1) {
|
||||
this.favorites.list.splice(index, 1);
|
||||
} else {
|
||||
this.favorites.list.push(key.data.link + '');
|
||||
}
|
||||
|
||||
this.$api
|
||||
.call(this.endpoint.favorites.set(
|
||||
JSON.stringify(this.favorites)
|
||||
));
|
||||
},
|
||||
unsetFavFocus(e) {
|
||||
if (e.target.dataset?.linkFavAdd !== undefined) {
|
||||
e.target.tabIndex = -1;
|
||||
} else {
|
||||
let items = e.target.querySelectorAll('[data-link-fav-add]:not([tabindex="-1"])');
|
||||
items.forEach(el => el.tabIndex = document.activeElement == el ? 0 : -1);
|
||||
}
|
||||
},
|
||||
setFavFocus(e) {
|
||||
if (e.target.dataset?.linkFavAdd !== undefined) {
|
||||
e.target.tabIndex = 0;
|
||||
} else {
|
||||
let items = e.target.querySelectorAll('[data-link-fav-add][tabindex="-1"]');
|
||||
items.forEach(el => el.tabIndex = 0);
|
||||
}
|
||||
},
|
||||
async setPreselection()
|
||||
{
|
||||
if (!this.preselectedKey)
|
||||
{
|
||||
this.selectedKey = null;
|
||||
return;
|
||||
}
|
||||
|
||||
let rawKey = this.preselectedKey
|
||||
|
||||
if (!rawKey || typeof rawKey !== 'string')
|
||||
return;
|
||||
|
||||
const parts = this.preselectedKey.split('/');
|
||||
let currentKey = parts[0];
|
||||
let currentNode = this.findNodeByKey(currentKey);
|
||||
|
||||
if (!currentNode)
|
||||
return;
|
||||
|
||||
if(this.selectedKey)
|
||||
{
|
||||
const currentSelectedKey = Object.keys(this.selectedKey).find(Boolean);
|
||||
if (currentSelectedKey) {
|
||||
if (currentSelectedKey == currentKey)
|
||||
return;
|
||||
/**
|
||||
* Do not select a new entry if the current is a child of the new one.
|
||||
* This happens if a child entry of a new stg is selected and the router
|
||||
* tries to select the stg root entry (because subtrees do not have
|
||||
* routes yet)
|
||||
*/
|
||||
const isChild = this.findNodeByKey(
|
||||
currentSelectedKey,
|
||||
currentNode.children || []
|
||||
);
|
||||
if (isChild)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
for (let i = 1; i < parts.length; i++)
|
||||
{
|
||||
this.expandedKeys[currentNode.key] = true;
|
||||
|
||||
await this.onExpandTreeNode(currentNode);
|
||||
|
||||
currentKey += '-' + parts[i];
|
||||
currentNode = this.findNodeByKey(currentKey);
|
||||
|
||||
if (!currentNode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
this.selectedKey = {[currentNode.key]: true};
|
||||
this.onSelectTreeNode(currentNode);
|
||||
},
|
||||
async toggleTreeNode(node) {
|
||||
if (this.expandedKeys[node.key]) {
|
||||
delete this.expandedKeys[node.key];
|
||||
} else if (!node.leaf) {
|
||||
await this.onExpandTreeNode(node);
|
||||
this.expandedKeys[node.key] = true;
|
||||
}
|
||||
if (node.link)
|
||||
this.$emit('selectVerband', {link: node.link, studiengang_kz: node.stg_kz, semester: node.semester, orgform_kurzbz: node.orgform_kurzbz});
|
||||
},
|
||||
getStudentAjaxId(student) {
|
||||
let res = student.id;
|
||||
@@ -264,23 +50,22 @@ export default {
|
||||
res += ' (' + student.vorname + ' ' + student.nachname + ')';
|
||||
return res;
|
||||
},
|
||||
dropStudents(node, students) {
|
||||
const data = node.data;
|
||||
|
||||
onDrop({ drag, drop }) {
|
||||
let endpoint;
|
||||
if (data.gruppe_kurzbz) {
|
||||
endpoint = students.map(student => [
|
||||
|
||||
if (drop.gruppe_kurzbz) {
|
||||
endpoint = drag.map(student => [
|
||||
this.getStudentAjaxId(student),
|
||||
ApiStvGroups.add(
|
||||
student.id,
|
||||
data.gruppe_kurzbz,
|
||||
drop.gruppe_kurzbz,
|
||||
this.currentSemester
|
||||
)
|
||||
]);
|
||||
} else {
|
||||
const { semester, verband, gruppe } = data;
|
||||
const { semester, verband, gruppe } = drop;
|
||||
const params = { semester, verband, gruppe };
|
||||
endpoint = students.map(student => [
|
||||
endpoint = drag.map(student => [
|
||||
this.getStudentAjaxId(student),
|
||||
ApiStvDetails.saveStudent(
|
||||
student.id,
|
||||
@@ -296,117 +81,14 @@ export default {
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.$api
|
||||
.call(this.endpoint.get())
|
||||
.then(result => {
|
||||
this.nodes = result.data.map(el => {
|
||||
el.root = true;
|
||||
return this.mapResultToTreeData(el);
|
||||
});
|
||||
this.setPreselection();
|
||||
this.loading = false;
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
|
||||
this.$api
|
||||
.call(this.endpoint.favorites.get())
|
||||
.then(result => {
|
||||
if (result.data) {
|
||||
this.favorites = JSON.parse(result.data);
|
||||
}
|
||||
})
|
||||
.catch(this.$fhcAlert.handleSystemError);
|
||||
},
|
||||
template: /* html */`
|
||||
<div class="overflow-auto" tabindex="-1">
|
||||
<pv-treetable
|
||||
ref="tree"
|
||||
class="stv-verband p-treetable-sm"
|
||||
:value="filteredNodes"
|
||||
@node-expand="onExpandTreeNode"
|
||||
selection-mode="single"
|
||||
v-model:expanded-keys="expandedKeys"
|
||||
v-model:selection-keys="selectedKey"
|
||||
@node-select="onSelectTreeNode"
|
||||
scrollable
|
||||
scroll-height="flex"
|
||||
@focusin="setFavFocus"
|
||||
@focusout="unsetFavFocus"
|
||||
:filters="filters"
|
||||
>
|
||||
<pv-column
|
||||
field="name"
|
||||
expander
|
||||
class="text-break"
|
||||
>
|
||||
<template #header>
|
||||
<div class="text-right">
|
||||
<div class="p-input-icon-left">
|
||||
<i class="pi pi-search"></i>
|
||||
<input
|
||||
type="text"
|
||||
v-model="filters['global']"
|
||||
class="form-control ps-5"
|
||||
placeholder="Search"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ node }">
|
||||
<span
|
||||
v-if="['semester', 'verband', 'gruppe', 'gruppe_kurzbz'].some(key => node.data.hasOwnProperty(key))"
|
||||
:data-tree-item-key="node.key"
|
||||
:title="node.data.studiengang_kz"
|
||||
v-drag-click="() => toggleTreeNode(node)"
|
||||
v-drop:link-strict.student-collection="(evt, students) => dropStudents(node, students)"
|
||||
>
|
||||
{{ node.data.name }}
|
||||
</span>
|
||||
<span
|
||||
v-else
|
||||
:data-tree-item-key="node.key"
|
||||
:title="node.data.studiengang_kz"
|
||||
v-drag-click="() => toggleTreeNode(node)"
|
||||
>
|
||||
{{ node.data.name }}
|
||||
</span>
|
||||
</template>
|
||||
</pv-column>
|
||||
<pv-column
|
||||
field="fav"
|
||||
class="flex-shrink-0 flex-grow-0"
|
||||
header-class="flex-shrink-0 flex-grow-0"
|
||||
>
|
||||
<template #header>
|
||||
<a
|
||||
v-if="favorites.on || favorites.list.length"
|
||||
href="#"
|
||||
@click.prevent="filterFav"
|
||||
>
|
||||
<i
|
||||
:class="favorites.on ? 'fa-solid' : 'fa-regular'"
|
||||
class="fa-star"
|
||||
></i>
|
||||
</a>
|
||||
</template>
|
||||
<template #body="{ node }">
|
||||
<a
|
||||
v-if="node.data.root"
|
||||
href="#"
|
||||
tabindex="-1"
|
||||
data-link-fav-add
|
||||
@click.prevent="markFav(node)"
|
||||
@keydown.enter.stop.prevent="markFav(node)"
|
||||
>
|
||||
<i
|
||||
:class="favorites.list.includes(node.data.link + '') ? 'fa-solid' : 'fa-regular'"
|
||||
class="fa-star"
|
||||
></i>
|
||||
</a>
|
||||
</template>
|
||||
</pv-column>
|
||||
<pv-column field="studiengang_kz" class="d-none"></pv-column>
|
||||
</pv-treetable>
|
||||
<base-menu
|
||||
ref="menu"
|
||||
config="stv"
|
||||
:preselected-key="preselectedKey"
|
||||
@select-entry="onSelectTreeNode"
|
||||
@drop="onDrop"
|
||||
/>
|
||||
</div>`
|
||||
};
|
||||
|
||||
@@ -41,8 +41,8 @@ export default {
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "Typ", field: "type"},
|
||||
{title: "Betrag", field: "betrag",
|
||||
{title: "Typ", field: "type", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{title: "Betrag", field: "betrag", headerFilter: true,
|
||||
formatter: function(cell) {
|
||||
let value = cell.getValue();
|
||||
if (value == null) {
|
||||
@@ -51,14 +51,14 @@ export default {
|
||||
return parseFloat(value).toFixed(2);
|
||||
}
|
||||
},
|
||||
{title: "Bezeichnung", field: "bezeichnung"},
|
||||
{title: "Studiensemester", field: "studiensemester_kurzbz"},
|
||||
{title: "Pruefung_id", field: "pruefung_id", visible: false},
|
||||
{title: "mitarbeiter_uid", field: "mitarbeiter_uid", visible: false},
|
||||
{title: "projektarbeit_id", field: "projektarbeit_id", visible: false},
|
||||
{title: "lehreinheit_id", field: "lehreinheit_id", visible: true},
|
||||
{title: "betreuerart_kurzbz", field: "betreuerart_kurzbz", visible: false},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false}, //just for testing
|
||||
{title: "Bezeichnung", field: "bezeichnung", headerFilter: true},
|
||||
{title: "Studiensemester", field: "studiensemester_kurzbz", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{title: "Pruefung_id", field: "pruefung_id", visible: false, headerFilter: true},
|
||||
{title: "mitarbeiter_uid", field: "mitarbeiter_uid", visible: false, headerFilter: true},
|
||||
{title: "projektarbeit_id", field: "projektarbeit_id", visible: false, headerFilter: true},
|
||||
{title: "lehreinheit_id", field: "lehreinheit_id", visible: true, headerFilter: true},
|
||||
{title: "betreuerart_kurzbz", field: "betreuerart_kurzbz", visible: false, headerFilter: true},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false, headerFilter: true}, //just for testing
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 50,
|
||||
@@ -110,10 +110,10 @@ export default {
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '200',
|
||||
height: '250',
|
||||
selectableRowsRangeMode: 'click',
|
||||
selectableRows: true,
|
||||
persistenceID: 'core-contracts-details-2026021701'
|
||||
persistenceID: 'core-contracts-details-2026050501'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
|
||||
setHeader('type', this.$p.t('global', 'typ'));
|
||||
setHeader('bezeichnung', this.$p.t('ui', 'bezeichnung'));
|
||||
setHeader('lehreinheit_id', this.$p.t('ui', 'lehreinheit_id'));
|
||||
setHeader('lehreinheit_id', this.$p.t('lehre', 'lehreinheit_id'));
|
||||
setHeader('betrag', this.$p.t('ui', 'betrag'));
|
||||
setHeader('studiensemester_kurzbz', this.$p.t('lehre', 'studiensemester'));
|
||||
setHeader('mitarbeiter_uid', this.$p.t('ui', 'mitarbeiter_uid'));
|
||||
|
||||
@@ -47,12 +47,13 @@ export default {
|
||||
this.endpoint.getStatiOfContract(this.person_id, this.vertrag_id)
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
persistenceID: 'core-contracts-status-2026021701',
|
||||
persistenceID: 'core-contracts-status-2026050501',
|
||||
columns: [
|
||||
{title: "Status", field: "bezeichnung"},
|
||||
{title: "Status", field: "bezeichnung", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{
|
||||
title: "Datum",
|
||||
field: "datum",
|
||||
headerFilter: true,
|
||||
formatter: function (cell) {
|
||||
const dateStr = cell.getValue();
|
||||
const date = new Date(dateStr); // Convert to Date object
|
||||
@@ -66,14 +67,15 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false},
|
||||
{title: "Vertragsstatus", field: "vertragsstatus_kurzbz", visible: false},
|
||||
{title: "User", field: "mitarbeiter_uid", visible: false},
|
||||
{title: "insertvon", field: "insertvon", visible: false},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false, headerFilter: true},
|
||||
{title: "Vertragsstatus", field: "vertragsstatus_kurzbz", visible: false, headerFilter: true},
|
||||
{title: "User", field: "mitarbeiter_uid", visible: false, headerFilter: true},
|
||||
{title: "insertvon", field: "insertvon", visible: false, headerFilter: true},
|
||||
{
|
||||
title: "insertamum",
|
||||
field: "insertamum",
|
||||
visible: false,
|
||||
headerFilter: true,
|
||||
formatter: function (cell) {
|
||||
const dateStr = cell.getValue();
|
||||
const date = new Date(dateStr);
|
||||
@@ -87,11 +89,12 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
{title: "updatevon", field: "updatevon", visible: false},
|
||||
{title: "updatevon", field: "updatevon", visible: false, headerFilter: true},
|
||||
{
|
||||
title: "updateamum",
|
||||
field: "updateamum",
|
||||
visible: false,
|
||||
headerFilter: true,
|
||||
formatter: function (cell) {
|
||||
const dateStr = cell.getValue();
|
||||
const date = new Date(dateStr);
|
||||
@@ -148,7 +151,7 @@ export default {
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: '200',
|
||||
height: '250',
|
||||
selectableRowsRangeMode: 'click',
|
||||
selectableRows: true,
|
||||
},
|
||||
|
||||
@@ -30,10 +30,11 @@ export default {
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "Typ", field: "type", width: 100},
|
||||
{title: "Typ", field: "type", width: 100, headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{
|
||||
title: "Betrag",
|
||||
field: "betrag1",
|
||||
headerFilter: true,
|
||||
formatter: function(cell) {
|
||||
let value = cell.getValue();
|
||||
if (value == null) {
|
||||
@@ -41,28 +42,29 @@ export default {
|
||||
}
|
||||
return parseFloat(value).toFixed(2);
|
||||
}},
|
||||
{title: "Bezeichnung", field: "bezeichnung", width: 150},
|
||||
{title: "Studiensemester", field: "studiensemester_kurzbz", width: 160},
|
||||
{title: "mitarbeiter_uid", field: "mitarbeiter_uid", visible: false},
|
||||
{title: "projektarbeit_id", field: "projektarbeit_id", visible: false},
|
||||
{title: "lehreinheit_id", field: "lehreinheit_id", visible: true},
|
||||
{title: "betreuerart_kurzbz", field: "betreuerart_kurzbz", visible: false},
|
||||
{title: "Vertragsstunden", field: "vertragsstunden", visible: false},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false}, //just for testing
|
||||
{title: "Bezeichnung", field: "bezeichnung", width: 150, headerFilter: true},
|
||||
{title: "Studiensemester", field: "studiensemester_kurzbz", width: 160, headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{title: "mitarbeiter_uid", field: "mitarbeiter_uid", visible: false, headerFilter: true},
|
||||
{title: "projektarbeit_id", field: "projektarbeit_id", visible: false, headerFilter: true},
|
||||
{title: "lehreinheit_id", field: "lehreinheit_id", visible: true, headerFilter: true},
|
||||
{title: "betreuerart_kurzbz", field: "betreuerart_kurzbz", visible: false, headerFilter: true},
|
||||
{title: "Vertragsstunden", field: "vertragsstunden", visible: false, headerFilter: true},
|
||||
{title: "vertrag_id", field: "vertrag_id", visible: false, headerFilter: true}, //just for testing
|
||||
{
|
||||
title: "VertragsstundenStudiensemester",
|
||||
field: "vertragsstunden_studiensemester_kurzbz",
|
||||
visible: false
|
||||
visible: false,
|
||||
headerFilter: true
|
||||
},
|
||||
],
|
||||
layout: 'fitColumns',
|
||||
layoutColumnsOnNewData: false,
|
||||
height: 150,
|
||||
height: 250,
|
||||
selectableRowsRangeMode: 'click',
|
||||
selectableRows: true,
|
||||
selectableRowsRollingSelection: false, //only allow multiselect with STRG
|
||||
index: "lehreinheit_id",
|
||||
persistenceID: 'core-contracts-unassigned-2026021701'
|
||||
persistenceID: 'core-contracts-unassigned-2026050501'
|
||||
},
|
||||
tabulatorEvents: [
|
||||
{
|
||||
@@ -100,7 +102,7 @@ export default {
|
||||
|
||||
setHeader('type', this.$p.t('global', 'typ'));
|
||||
setHeader('bezeichnung', this.$p.t('ui', 'bezeichnung'));
|
||||
setHeader('lehreinheit_id', this.$p.t('ui', 'lehreinheit_id'));
|
||||
setHeader('lehreinheit_id', this.$p.t('lehre', 'lehreinheit_id'));
|
||||
setHeader('betrag1', this.$p.t('ui', 'betrag'));
|
||||
setHeader('studiensemester_kurzbz', this.$p.t('lehre', 'studiensemester'));
|
||||
setHeader('mitarbeiter_uid', this.$p.t('ui', 'mitarbeiter_uid'));
|
||||
|
||||
@@ -20,9 +20,6 @@ export default {
|
||||
ContractStati
|
||||
},
|
||||
inject: {
|
||||
/* cisRoot: {
|
||||
from: 'cisRoot'
|
||||
},*/
|
||||
hasSchreibrechte: {
|
||||
from: 'hasSchreibrechte',
|
||||
default: false
|
||||
@@ -54,9 +51,9 @@ export default {
|
||||
),
|
||||
ajaxResponse: (url, params, response) => response.data,
|
||||
columns: [
|
||||
{title: "Bezeichnung", field: "bezeichnung", width: 300},
|
||||
{title: "Bezeichnung", field: "bezeichnung", width: 300, headerFilter: true},
|
||||
{
|
||||
title: "Betrag", field: "betrag", width: 100,
|
||||
title: "Betrag", field: "betrag", width: 100, headerFilter: true,
|
||||
formatter: function (cell) {
|
||||
let value = cell.getValue();
|
||||
|
||||
@@ -66,12 +63,13 @@ export default {
|
||||
return parseFloat(value).toFixed(2);
|
||||
}
|
||||
},
|
||||
{title: "Vertragstyp", field: "vertragstyp_bezeichnung", width: 125},
|
||||
{title: "Status", field: "status", width: 100},
|
||||
{title: "Vertragstyp", field: "vertragstyp_bezeichnung", width: 125, headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{title: "Status", field: "status", width: 100, headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}},
|
||||
{
|
||||
title: "Vertragsdatum",
|
||||
field: "vertragsdatum",
|
||||
width: 128,
|
||||
headerFilter: true,
|
||||
formatter: function (cell) {
|
||||
const dateStr = cell.getValue();
|
||||
const date = new Date(dateStr);
|
||||
@@ -82,11 +80,11 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
{title: "VertragId", field: "vertrag_id", visible: false},
|
||||
{title: "Vertragsstunden", field: "vertragsstunden", visible: false},
|
||||
{title: "VertragsstundenStudiensemester", field: "vertragsstunden_studiensemester_kurzbz", visible: false},
|
||||
{title: "Anmerkung", field: "anmerkung", visible: false},
|
||||
{title: "isAbgerechnet", field: "isabgerechnet", visible: false},
|
||||
{title: "VertragId", field: "vertrag_id", visible: false, headerFilter: true},
|
||||
{title: "Vertragsstunden", field: "vertragsstunden", visible: false, headerFilter: true},
|
||||
{title: "VertragsstundenStudiensemester", field: "vertragsstunden_studiensemester_kurzbz", visible: false, headerFilter: true},
|
||||
{title: "Anmerkung", field: "anmerkung", visible: false, headerFilter: true},
|
||||
{title: "isAbgerechnet", field: "isabgerechnet", visible: false, headerFilter: true},
|
||||
{
|
||||
title: 'Aktionen', field: 'actions',
|
||||
minWidth: 150,
|
||||
@@ -140,11 +138,13 @@ export default {
|
||||
columns: true,
|
||||
filter: false //to avoids js errors
|
||||
},
|
||||
persistenceID: 'core-contracts-2026021701',
|
||||
persistenceID: 'core-contracts-2026050501',
|
||||
};
|
||||
return options;
|
||||
},
|
||||
tabulatorEvents() {
|
||||
const vm = this;
|
||||
|
||||
const events = [
|
||||
{
|
||||
event: 'tableBuilt',
|
||||
@@ -177,28 +177,11 @@ export default {
|
||||
setHeader('actions', this.$p.t('global', 'aktionen'));
|
||||
}
|
||||
},
|
||||
/* {
|
||||
//is just enabled for ADDON Injection KU: MultiprintHonorarvertrag
|
||||
//(maybe enable also for ADDON FH Burgenland: MultiAccept later)
|
||||
event: 'rowClick',
|
||||
handler: (e, row) => {
|
||||
if (this.dataPrintHonorar != null && this.dataPrintHonorar.multiselect != null) {
|
||||
const selectedContract = row.getData().vertrag_id;
|
||||
const status = row.getData().status;
|
||||
const bezeichnung = row.getData().bezeichnung;
|
||||
|
||||
this.toggleRowClick(selectedContract, status, bezeichnung);
|
||||
}
|
||||
}
|
||||
},*/
|
||||
{
|
||||
event: 'rowClick',
|
||||
handler: (e, row) => {
|
||||
if (!this.dataPrintHonorar?.multiselect) return;
|
||||
|
||||
handler: function (e, row) {
|
||||
const { vertrag_id, status, bezeichnung, vertragstyp_bezeichnung } = row.getData();
|
||||
|
||||
this.toggleRowClick(e, vertrag_id, status, bezeichnung, vertragstyp_bezeichnung);
|
||||
vm.toggleRowClick(e, vertrag_id, status, bezeichnung, vertragstyp_bezeichnung);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -242,8 +225,6 @@ export default {
|
||||
person_id() {
|
||||
this.$refs.table.reloadTable();
|
||||
this.arraySelectedContracts = [];
|
||||
/* if(this.dataPrintHonorar?.multiselect)
|
||||
this.dataPrintHonorar.multiselect = [];*/
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -270,7 +251,6 @@ export default {
|
||||
)
|
||||
.then(result => {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete'));
|
||||
//window.scrollTo(0, 0);
|
||||
this.reload();
|
||||
this.contractSelected.vertrag_id = null;
|
||||
})
|
||||
@@ -518,19 +498,9 @@ export default {
|
||||
'content/pdfExport.php?xml=' + this.dataPrintHonorar.xml + '&xsl=' + this.dataPrintHonorar.xsl + '&mitarbeiter_uid=' + this.mitarbeiter_uid + vertragString + '&output=pdf&uid=' + this.mitarbeiter_uid;
|
||||
window.open(linkToPdf, '_blank');
|
||||
},
|
||||
/* toggleRowClick(contractId, status, bezeichnung) {
|
||||
const index = this.arraySelectedContracts.findIndex(
|
||||
([id]) => id === contractId
|
||||
);
|
||||
if (index !== -1) {
|
||||
this.arraySelectedContracts.splice(index, 1);
|
||||
} else {
|
||||
this.arraySelectedContracts.push([contractId, status, bezeichnung]);
|
||||
}
|
||||
},*/
|
||||
toggleRowClick(event, vertrag_id, status, bezeichnung, vertragstyp_bezeichnung) {
|
||||
if (!this.dataPrintHonorar?.multiselect) return;
|
||||
|
||||
const isMulti = this.dataPrintHonorar?.multiselect === true;
|
||||
const isCtrl = event.ctrlKey || event.metaKey;
|
||||
|
||||
const entry = {
|
||||
@@ -540,28 +510,29 @@ export default {
|
||||
vertragstyp_bezeichnung
|
||||
};
|
||||
|
||||
// Single click
|
||||
if (!isCtrl) {
|
||||
// allow MultiSelect just in case event multiActionPrintHonorarvertrag
|
||||
const allowMultiClick = isMulti && isCtrl;
|
||||
|
||||
if (!allowMultiClick) {
|
||||
this.arraySelectedContracts = [entry];
|
||||
|
||||
//just mark last selected row as selected
|
||||
this.$refs.table.tabulator.deselectRow();
|
||||
this.$refs.table.tabulator.selectRow(vertrag_id);
|
||||
return;
|
||||
}
|
||||
|
||||
// CTRL / CMD → toggle
|
||||
const index = this.arraySelectedContracts.findIndex(
|
||||
e => e.vertrag_id === vertrag_id
|
||||
);
|
||||
|
||||
if (index === -1) {
|
||||
this.arraySelectedContracts.push(entry);
|
||||
//this.arraySelectedContracts.push([entry.vertrag_id, entry.status, entry.bezeichnung, entry.vertragstyp_bezeichnung]);
|
||||
} else {
|
||||
this.arraySelectedContracts.splice(index, 1);
|
||||
}
|
||||
},
|
||||
/* clearSelection(){
|
||||
this.arraySelectedContracts = [];
|
||||
this.$refs.table.tabulator.deselectRow();
|
||||
}*/
|
||||
|
||||
}
|
||||
},
|
||||
created() {
|
||||
Promise.all([
|
||||
@@ -587,88 +558,6 @@ export default {
|
||||
});
|
||||
this.getFormattedDate();
|
||||
},
|
||||
/*
|
||||
TODO(Manu) delete after check
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="DatePicker"
|
||||
:label="$p.t('vertrag/datum_vertrag')"
|
||||
name="vertragsdatum"
|
||||
v-model="formData.vertragsdatum"
|
||||
auto-apply
|
||||
:enable-time-picker="false"
|
||||
format="dd.MM.yyyy"
|
||||
preview-format="dd.MM.yyyy"
|
||||
:teleport="true"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="text"
|
||||
:label="$p.t('ui/bezeichnung')"
|
||||
name="bezeichnung"
|
||||
v-model="formData.bezeichnung"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="select"
|
||||
:label="$p.t('global/typ')"
|
||||
v-model="formData.vertragstyp_kurzbz"
|
||||
name="vertragstyp_kurzbz"
|
||||
>
|
||||
<option :value="null">-- {{$p.t('fehlermonitoring', 'keineAuswahl')}} --</option>
|
||||
<option
|
||||
v-for="entry in listContractTypes"
|
||||
:key="entry.vertragstyp_kurzbz"
|
||||
:value="entry.vertragstyp_kurzbz"
|
||||
>
|
||||
{{entry.bezeichnung}}
|
||||
</option>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
:label="$p.t('ui/betrag')"
|
||||
name="betrag"
|
||||
v-model="formData.betrag"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3" v-if="!statusNew">
|
||||
<form-input
|
||||
type="text"
|
||||
:label="$p.t('ui/stunden') + ' (' + $p.t('vertrag/vertrag_urfassung')+ ')'"
|
||||
name="vertragsstunden"
|
||||
v-model="formData.vertragsstunden"
|
||||
disabled
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3" v-if="!statusNew">
|
||||
<form-input
|
||||
type="text"
|
||||
:label="$p.t('lehre/studiensemester') + ' (' + $p.t('vertrag/vertrag_urfassung')+ ')'"
|
||||
name="vertragsstunden_studiensemester_kurzbz"
|
||||
v-model="formData.vertragsstunden_studiensemester_kurzbz"
|
||||
disabled
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<form-input
|
||||
type="textarea"
|
||||
:label="$p.t('global/anmerkung')"
|
||||
name="anmerkung"
|
||||
v-model="formData.anmerkung"
|
||||
>
|
||||
</form-input>
|
||||
</div>
|
||||
*/
|
||||
template: `
|
||||
<div class="core-contracts h-100 d-flex flex-column">
|
||||
|
||||
|
||||
@@ -9,6 +9,26 @@ const EFFECTS = [
|
||||
|
||||
export default {
|
||||
mounted(el, binding) {
|
||||
if (!binding.arg) {
|
||||
binding.arg = 'none';
|
||||
} else if (typeof binding.arg === 'object' && !Array.isArray(binding.arg)) {
|
||||
// NOTE(chris): allow object as arg and map it to arg and
|
||||
// modifiers to allow dynamic modifiers.
|
||||
if (binding.arg.allowed) {
|
||||
binding.modifiers = binding.arg.allowed.reduce((a, c) => {
|
||||
a[c] = true;
|
||||
return a;
|
||||
}, {});
|
||||
}
|
||||
if (!binding.arg.effect)
|
||||
binding.arg.effect = 'none';
|
||||
|
||||
if (binding.arg.strict)
|
||||
binding.arg = binding.arg.effect + '-strict';
|
||||
else
|
||||
binding.arg = binding.arg.effect;
|
||||
}
|
||||
|
||||
const allowedTypes = Object.keys(binding.modifiers);
|
||||
allowedTypes.forEach(type => {
|
||||
if (type.substr(-11) == '-collection') {
|
||||
|
||||
@@ -41761,7 +41761,7 @@ array(
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'abgabetool',
|
||||
'phrase' => 'c4fehlerAktualitaetProjektarbeit ',
|
||||
'phrase' => 'c4fehlerAktualitaetProjektarbeit',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user