From eee9d6b691f3c9c1939757c9d0b399f95a3e9465 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Mon, 8 Sep 2025 17:28:09 +0200 Subject: [PATCH] raumsuche phrasen change & fix; fhcapi -> api; lvMenu try to use phrasenkey for responsiveness instead of the already looked up phrase; tried investigating news carousel bug, not sure if bug or feature - at least declared non changing variables as const; --- public/js/api/factory/ort.js | 14 ++++++ .../Cms/Content_types/Raum_contentmittitel.js | 4 +- public/js/components/Cis/Mylv/LvMenu.js | 9 +++- .../js/components/Cis/Raumsuche/Raumsuche.js | 46 +++++++++++-------- public/js/components/DashboardWidget/News.js | 10 ++-- system/phrasesupdate.php | 46 +++++++++++++++++-- 6 files changed, 98 insertions(+), 31 deletions(-) diff --git a/public/js/api/factory/ort.js b/public/js/api/factory/ort.js index 90488df1b..2e06d6b71 100644 --- a/public/js/api/factory/ort.js +++ b/public/js/api/factory/ort.js @@ -22,5 +22,19 @@ export default { url: '/api/frontend/v1/Ort/ContentID', params: { ort_kurzbz: ort_kurbz } }; + }, + getRooms(datum, von, bis, typ, personenanzahl = 0) { + return { + method: 'get', + url: '/api/frontend/v1/Ort/getRooms', + params: { datum, von, bis, typ, personenanzahl } + }; + }, + getRoomTypes() { + return { + method: 'get', + url: '/api/frontend/v1/Ort/getTypes', + params: { } + }; } }; \ No newline at end of file diff --git a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js index d7b9ed956..8373b6ac9 100644 --- a/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js +++ b/public/js/components/Cis/Cms/Content_types/Raum_contentmittitel.js @@ -12,7 +12,7 @@ export default { required:true, }, content_id:{ - type:Number, + type: [Number, String], } }, methods: { @@ -129,7 +129,7 @@ export default { template: /*html*/ ` -
+

Content was not found

`, diff --git a/public/js/components/Cis/Mylv/LvMenu.js b/public/js/components/Cis/Mylv/LvMenu.js index 88340f01b..ef820ebb0 100644 --- a/public/js/components/Cis/Mylv/LvMenu.js +++ b/public/js/components/Cis/Mylv/LvMenu.js @@ -43,6 +43,13 @@ export default { return menuItem.c4_link ?? null; } }, + getMenuName(menuItem) { + if(menuItem.phrase) { + return this.$p.t(menuItem.phrase) + } else { + return menuItem.name + } + } }, template:/*html*/`
{{$p.t('lehre','lehrveranstaltungsUnavailable')}}
@@ -54,7 +61,7 @@ export default { :disabled="c4_disabled(menuItem)" :data-bs-toggle="menuItem.c4_moodle_links?.length?'dropdown':null" class="menu-entry p-2 w-100 text-wrap border border-1 rounded-3 d-flex flex-column align-items-center justify-content-center text-center text-decoration-none link h-100"> -

{{menuItem.name}}

+

{{ getMenuName(menuItem) }}

{{text}}