mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-11 12:02:26 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8548b93ddc | |||
| bdc4782e9d | |||
| 0583990870 | |||
| 335753be8c | |||
| 8862f050e8 | |||
| 29f9b226ab |
@@ -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']);
|
||||
|
||||
@@ -218,23 +218,15 @@ export const CoreFilterCmpt = {
|
||||
},
|
||||
columnsForFilter() {
|
||||
if (!this.filteredColumns || !this.datasetMetadata) return [];
|
||||
|
||||
const localizedColumnTitles = this.tabulator.getLang().columns;
|
||||
const isTabulatorLocalized = !!this.$props.tabulatorOptions.locale;
|
||||
|
||||
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;
|
||||
}, {});
|
||||
}
|
||||
|
||||
const filterTitles = this.filteredColumns.reduce((a, c) => {
|
||||
a[c.field] =
|
||||
isTabulatorLocalized && localizedColumnTitles[c.field]
|
||||
? localizedColumnTitles[c.field]
|
||||
: c.title;
|
||||
return a;
|
||||
}, {});
|
||||
return this.datasetMetadata.map((el) => ({
|
||||
...el,
|
||||
...{ title: filterTitles[el.name] },
|
||||
|
||||
Reference in New Issue
Block a user