From fe6f229d9f4a4866cb2c05ee0bc55ac811aed1b6 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Tue, 3 Dec 2024 14:44:18 +0100 Subject: [PATCH 01/76] template fix; remove unused menu function; --- .../controllers/api/frontend/v1/LvMenu.php | 18 ------------------ public/js/components/DashboardWidget/News.js | 2 +- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/application/controllers/api/frontend/v1/LvMenu.php b/application/controllers/api/frontend/v1/LvMenu.php index 777d49b0c..328ef194d 100644 --- a/application/controllers/api/frontend/v1/LvMenu.php +++ b/application/controllers/api/frontend/v1/LvMenu.php @@ -284,24 +284,6 @@ class LvMenu extends FHCAPI_Controller } - - private function fhc_menu_digitale_anwesenheiten(&$menu, $angemeldet, $studiengang_kz, $semester, $lvid, $angezeigtes_stsem){ - - // DIGITALE ANWESENHEITEN - if (defined('CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN') && CIS_LEHRVERANSTALTUNG_ANWESENHEIT_ANZEIGEN && $angemeldet) { - - $menu[] = array - ( - 'id' => 'core_menu_digitale_anwesenheitslisten', - 'position' => '50', - 'name' => $this->p->t('lehre', 'digiAnw'), - 'c4_icon' => base_url('skin/images/button_kreuzerltool.png'), - 'c4_link' => base_url("index.ci.php/extensions/FHC-Core-Anwesenheiten/?stg_kz=$studiengang_kz&sem=$semester&lvid=$lvid&sem_kurzbz=$angezeigtes_stsem&nav=false"), - 'c4_linkList' => [] - ); - } - } - private function fhc_menu_lvinfo(&$menu, $lvid, $studiengang_kz, $lektor_der_lv, $is_lector, $lehrfach_oe_kurzbz_arr){ // LVINFO diff --git a/public/js/components/DashboardWidget/News.js b/public/js/components/DashboardWidget/News.js index f774f0934..8f36f86f6 100644 --- a/public/js/components/DashboardWidget/News.js +++ b/public/js/components/DashboardWidget/News.js @@ -164,7 +164,7 @@ export default { data-bs-interval="false" ref="carocontrols">
-
{{person_data.fullname}}
+
{{person_data.fullname}}

From f0e97c915b4d095f5a3f5056b34e2c70f1e8507b Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 5 Dec 2024 13:53:08 +0100 Subject: [PATCH 07/76] rename bindKeys() to addEndpoints(); removed Vue.reactive on $fhcApi; check if Api has been instantiated in install, only addEndpoints if that is the case; --- public/js/plugin/FhcApi.js | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/public/js/plugin/FhcApi.js b/public/js/plugin/FhcApi.js index c25204d49..0845a1a5e 100644 --- a/public/js/plugin/FhcApi.js +++ b/public/js/plugin/FhcApi.js @@ -4,6 +4,12 @@ import FhcApiFactory from '../api/fhcapifactory.js'; export default { install: (app, options) => { + if (app.config.globalProperties.$fhcApi) { + if (options?.factory) { + app.config.globalProperties.$fhcApi.factory.addEndpoints(options.factory); + } + return; + } app.use(FhcAlert); function _get_config(form, uri, data, config) { @@ -136,7 +142,7 @@ export default { return Promise.reject(error); }); - app.config.globalProperties.$fhcApi = Vue.reactive({ + app.config.globalProperties.$fhcApi = { getUri(url) { return fhcApiAxios.getUri({url}); }, @@ -289,38 +295,43 @@ export default { $fhcAlert.alertDefault('error', error.message, message); } } - }); + }; class FhcApiFactoryWrapper { constructor(factorypart, root) { - if (root === undefined) + if (root === undefined) { this.$fhcApi = app.config.globalProperties.$fhcApi; - else + this.$fhcApi.factory = this; + } else { Object.defineProperty(this, '$fhcApi', { get() { return (root || this).$fhcApi; } }) + } - this.bindKeys(factorypart, root) + this.addEndpoints(factorypart) } - bindKeys(factorypart, root) { + addEndpoints(factorypart) { Object.keys(factorypart).forEach(key => { Object.defineProperty(this, key, { get() { if (typeof factorypart[key] == 'function') return factorypart[key].bind(this); - return new FhcApiFactoryWrapper(factorypart[key], root || this); + return new FhcApiFactoryWrapper(factorypart[key], this.$fhcApi.factory); } }); }); } } - const mergedFhcApiFactory = options?.factory ? {...FhcApiFactory, ...options.factory} : FhcApiFactory; + const factory = new FhcApiFactoryWrapper(FhcApiFactory); + if (options?.factory) + factory.addEndpoints(options.factory); + + app.config.globalProperties.$fhcApi.factory = factory; - app.config.globalProperties.$fhcApi.factory = new FhcApiFactoryWrapper(mergedFhcApiFactory); app.provide('$fhcApi', app.config.globalProperties.$fhcApi); } }; \ No newline at end of file From 7f6884b67deca611348ddd37b2c3bde05bc2d691 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Thu, 5 Dec 2024 15:03:46 +0100 Subject: [PATCH 08/76] primevue imports cis/dashboard; Anw widget implementation; WIP showing single anw entries on click on a quota progress bar in widget; --- application/views/CisVue/Dashboard.php | 8 ++- public/js/apps/Cis.js | 6 ++ public/js/apps/Dashboard/Fhc.js | 7 +- public/js/components/Cis/Cms/Content.js | 95 +++++++++++++------------ public/js/components/Cis/Cms/News.js | 66 ++++++++--------- 5 files changed, 100 insertions(+), 82 deletions(-) diff --git a/application/views/CisVue/Dashboard.php b/application/views/CisVue/Dashboard.php index 2f241af87..f97af8b07 100644 --- a/application/views/CisVue/Dashboard.php +++ b/application/views/CisVue/Dashboard.php @@ -3,7 +3,13 @@ $includesArray = array( 'title' => 'Dashboard', 'tabulator5'=>true, 'primevue3' => true, - 'customJSModules' => ['public/js/apps/Dashboard/Fhc.js'], + 'customJSModules' => [ + 'public/js/apps/Dashboard/Fhc.js' + ], + 'customJSs' => [ + 'vendor/npm-asset/primevue/accordion/accordion.js', + 'vendor/npm-asset/primevue/accordiontab/accordiontab.js' + ], 'customCSSs' => [ 'public/css/components/dashboard.css' ], diff --git a/public/js/apps/Cis.js b/public/js/apps/Cis.js index c9d322e07..78b82cc1f 100644 --- a/public/js/apps/Cis.js +++ b/public/js/apps/Cis.js @@ -107,5 +107,11 @@ const app = Vue.createApp({ } }); app.use(FhcApi); +app.use(primevue.config.default, { + zIndex: { + overlay: 9000, + tooltip: 8000 + } +}) app.use(Phrasen); app.mount('#cis-header'); diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index d096d4cde..24459759f 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -14,7 +14,12 @@ const app = Vue.createApp({ }); setScrollbarWidth(); - app.use(FhcApi); +app.use(primevue.config.default, { + zIndex: { + overlay: 9000, + tooltip: 8000 + } +}) app.use(Phrasen); app.mount('#content'); \ No newline at end of file diff --git a/public/js/components/Cis/Cms/Content.js b/public/js/components/Cis/Cms/Content.js index 2ba999007..efcd34e12 100644 --- a/public/js/components/Cis/Cms/Content.js +++ b/public/js/components/Cis/Cms/Content.js @@ -3,55 +3,56 @@ import general from './Content_types/General.js' export default { - props:{ - content_id:{ - type:Number, - required:true, - }, - version:{ - type:[String, Number], - default: null, - }, - sprache:{ - type:[String, Number], - default: null, - }, - sichtbar:{ - type:[String, Number], - default: null, - } + props: { + content_id: { + type: Number, + required: true, + }, + version: { + type: [String, Number], + default: null, + }, + sprache: { + type: [String, Number], + default: null, + }, + sichtbar: { + type: [String, Number], + default: null, + } - }, - components:{ - raum_contentmittitel, - general, - }, - data() { - return { - content: null, - }; - }, - computed:{ - computeContentType: function(){ - switch(this.content_type){ - case "raum_contentmittitel": - return "raum_contentmittitel"; - default: - return "general"; - }; - }, - }, - created() { - this.$fhcApi.factory.cms.content(this.content_id,this.version, this.sprache, this.sichtbar).then(res =>{ - this.content = res.data.content; - this.content_type=res.data.type; - }); - }, - mounted(){ - - }, - template: /*html*/ ` + }, + components: { + raum_contentmittitel, + general, + }, + data() { + return { + content: null, + }; + }, + computed: { + computeContentType: function () { + switch (this.content_type) { + case "raum_contentmittitel": + return "raum_contentmittitel"; + default: + return "general"; + } + ; + }, + }, + created() { + this.$fhcApi.factory.cms.content(this.content_id, this.version, this.sprache, this.sichtbar).then(res => { + this.content = res.data.content; + this.content_type = res.data.type; + }); + }, + mounted() { + + }, + template: /*html*/ `

No content is available to display

diff --git a/public/js/components/Cis/Cms/News.js b/public/js/components/Cis/Cms/News.js index 8e8c080f7..e104737a8 100644 --- a/public/js/components/Cis/Cms/News.js +++ b/public/js/components/Cis/Cms/News.js @@ -1,40 +1,40 @@ import Pagination from "../../Pagination/Pagination.js"; export default { - components: { - Pagination, - }, - data() { - return { - content: null, - maxPageCount: 0, - page_size: 10, - }; - }, - methods: { - loadNewPageContent: function (data) { - this.$fhcApi.factory.cms.getNews(data.page, data.rows) - .then(res => res.data) - .then(result => { - this.content = result; - }); - - }, - }, - created() { - this.$fhcApi.factory.cms.getNews(1, this.page_size) - .then(res => res.data) - .then(result => { - this.content = result; - }); + components: { + Pagination, + }, + data() { + return { + content: null, + maxPageCount: 0, + page_size: 10, + }; + }, + methods: { + loadNewPageContent: function (data) { + this.$fhcApi.factory.cms.getNews(data.page, data.rows) + .then(res => res.data) + .then(result => { + this.content = result; + }); - this.$fhcApi.factory.cms.getNewsRowCount() - .then(res => res.data) - .then(result => { - this.maxPageCount = result; - }); - }, - template: /*html*/ ` + }, + }, + created() { + this.$fhcApi.factory.cms.getNews(1, this.page_size) + .then(res => res.data) + .then(result => { + this.content = result; + }); + + this.$fhcApi.factory.cms.getNewsRowCount() + .then(res => res.data) + .then(result => { + this.maxPageCount = result; + }); + }, + template: /*html*/ `

News


From 797e52aad71f728a0b127a48a3010376a45cf10a Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 5 Dec 2024 15:22:53 +0100 Subject: [PATCH 09/76] refactor(News-StudiengangInformationen): adds the Studiengangs informationen next to the news View --- application/config/cis.php | 2 +- public/js/components/Cis/Cms/News.js | 10 +-- .../StudiengangInformation.js | 68 ++++++++----------- 3 files changed, 37 insertions(+), 43 deletions(-) diff --git a/application/config/cis.php b/application/config/cis.php index b7330ef29..82655f244 100644 --- a/application/config/cis.php +++ b/application/config/cis.php @@ -4,6 +4,6 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); // CMS Content Id for CIS4 Menu Root -$config['cis_menu_root_content_id'] = 11066; +$config['cis_menu_root_content_id'] = 11087; // send Mails for ProfilUpdate $config['cis_send_profil_update_mails'] = true; diff --git a/public/js/components/Cis/Cms/News.js b/public/js/components/Cis/Cms/News.js index fc8df69b1..f61cd3154 100644 --- a/public/js/components/Cis/Cms/News.js +++ b/public/js/components/Cis/Cms/News.js @@ -41,12 +41,14 @@ export default {
-
+
-
+
-
- +
+
+ +
diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js index ddc8cab93..06454736c 100644 --- a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js @@ -18,31 +18,34 @@ components:{ StudiengangPerson }, template:/*html*/` - - -
- - - + + + +
+ + + `, computed:{ @@ -108,23 +111,13 @@ methods:{ { return "tel:".concat(telefone).concat(" "+telefoneklappe); } - else if(telefone) - { - return "tel:".concat(telefone); - } else { - return null; + return telefon ? "tel:".concat(telefone): null; } }, studiengangs_person_email: function (email) { - if (email) - { - return "mailto:".concat(email); - } - else { - return null; - } + return email? "mailto:".concat(email): null; }, }, mounted(){ @@ -132,7 +125,6 @@ mounted(){ .then(res => res.data) .then(studiengangInformationen => { Object.assign(this, studiengangInformationen); - console.log(studiengangInformationen,"das sind die Informationen") }); }, From 0a5c335602b1a0f4bdfa9d70c337f4eb89307265 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Thu, 5 Dec 2024 16:22:21 +0100 Subject: [PATCH 10/76] refactor(News-StudiengangInformationen): component clean up and refactors vertretungen into own component --- .../StudiengangInformation.js | 104 ++++------------ .../StudiengangPerson.js | 112 +++++++++--------- .../StudiengangVertretung.js | 32 +++++ 3 files changed, 111 insertions(+), 137 deletions(-) create mode 100644 public/js/components/Cis/Cms/StudiengangInformation/StudiengangVertretung.js diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js index 06454736c..4eabf82c6 100644 --- a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangInformation.js @@ -1,4 +1,5 @@ import StudiengangPerson from "./StudiengangPerson"; +import StudiengangVertretung from "./StudiengangVertretung"; export default { data(){ @@ -15,36 +16,40 @@ data(){ } }, components:{ - StudiengangPerson + StudiengangPerson, + StudiengangVertretung, }, template:/*html*/` -
`, @@ -52,73 +57,6 @@ computed:{ collection_array: function(){ return [{ title: "Studiengangsleitung", collection: this.stg_ltg }, { title: "geschäftsführende Leitung", collection: this.gf_ltg },{ title: "stellvertretende Leitung", collection: this.stv_ltg },{ title: "Sekretariat", collection: this.ass} ]; }, - - studiengangs_assistenz_array: function () { - // early return if the reactive data is not yet loaded or not present - if (!this.ass) - return null; - - return this.ass.map((assistenz) => { - return { - fullname: this.studiengangs_person_fullname(assistenz.titelpre, assistenz.vorname, assistenz.nachname), - telefone: this.studiengangs_person_phone(assistenz.kontakt, assistenz.telefonklappe), - ort: assistenz.planbezeichnung ?? null, - email: this.studiengangs_person_email(assistenz.email), - } - }) - }, -}, -methods:{ - vertretungFormatedName: function(vertretung,bezeichnung=true){ - if(!vertretung) return null; - return `${vertretung.vorname ?? ''} ${vertretung.nachname ?? ''} ${vertretung.bezeichnung && bezeichnung ? '('.concat(vertretung.bezeichnung.replace("(","").replace(")","")).concat(")") : ''}` - }, - studiengangs_person_data: function (collection) { - // early return if the reactive data is not yet loaded or not present - if (!collection || !Array.isArray(collection) || collection.length === 0) - return null; - - return collection.map((item) => { - return { - fullname: this.studiengangs_person_fullname(item.titelpre, item.vorname, item.nachname), - telefone: this.studiengangs_person_phone(item.kontakt, item.telefonklappe), - ort: item.planbezeichnung ?? null, - email: this.studiengangs_person_email(item.email), - foto: item.foto ? 'data:image/png;base64,'.concat(item.foto) : null, - } - }) - }, - studiengangs_person_fullname: function(titelpre, vorname, nachname){ - if (titelpre && vorname && nachname) - { - return `${titelpre} ${vorname} ${nachname}`; - } - else if (vorname && nachname) - { - return `${vorname} ${nachname}`; - } - else if (nachname) - { - return vorname; - } - else - { - return null; - } - }, - studiengangs_person_phone: function (telefone,telefoneklappe) { - if(telefone && telefoneklappe) - { - return "tel:".concat(telefone).concat(" "+telefoneklappe); - } - else - { - return telefon ? "tel:".concat(telefone): null; - } - }, - studiengangs_person_email: function (email) { - return email? "mailto:".concat(email): null; - }, }, mounted(){ this.$fhcApi.factory.studiengang.studiengangInformation() diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangPerson.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangPerson.js index 294f41cdf..9a077ef82 100644 --- a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangPerson.js +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangPerson.js @@ -1,31 +1,12 @@ export default { - data(){ - - }, - props:{ - person_data: - { - type: Object, - required: true - } - }, - computed:{ - formattedEmail: function(){ - if(!this.person_data ) return null; - let emailString= this.person_data.email.replace("mailto:", ""); - // when splitting a string, the letter that is used to split the string will be removed from the result - let emailArray = emailString.split('@'); - // returns both parts of the splitted string in combination with the removed letter and a word break - return emailArray[0] + '@' + emailArray[1]; - }, - }, + props:["uid","vorname","nachname","titelpre","kontakt","telefonklappe","email","planbezeichnung","foto"], template:/*html*/`
- person_dataFoto + mitarbeiter_foto
-
{{person_data.fullname}}
+
{{fullname}}

@@ -34,52 +15,75 @@ export default {
- {{person_data.ort}} + {{ort}}
- +
- `, + `, + computed:{ + formattedEmail: function(){ + if(!this.email ) return null; + let emailString= this.email.replace("mailto:", ""); + // when splitting a string, the letter that is used to split the string will be removed from the result + let emailArray = emailString.split('@'); + // returns both parts of the splitted string in combination with the removed letter and a word break + return emailArray[0] + '@' + emailArray[1]; + }, + fullname: function () { + if (this.titelpre && this.vorname && this.nachname) { + return `${this.titelpre} ${this.vorname} ${this.nachname}`; + } + else if (this.vorname && this.nachname) { + return `${this.vorname} ${this.nachname}`; + } + else if (this.nachname) { + return this.vorname; + } + else { + return null; + } + }, + phone: function () { + if (this.kontakt && this.telefoneklappe) { + return { + link: "tel:".concat(this.kontakt).concat(" " + this.telefoneklappe), + number: this.kontakt.concat(" " + this.telefoneklappe), + } + } + else { + return this.kontakt ? { + link: "tel:".concat(this.kontakt), + number: this.kontakt, + } : null; + } + }, + email_link: function () { + return this.email ? "mailto:".concat(this.email) : null; + }, + base64Image:function(){ + return this.foto ? 'data:image/png;base64,'.concat(this.foto) : null; + }, + ort:function(){ + return this.planbezeichnung ?? null; + }, + profilViewLink: function(){ + return this.uid ? FHC_JS_DATA_STORAGE_OBJECT.app_root.concat(FHC_JS_DATA_STORAGE_OBJECT.ci_router).concat("/Cis/Profil/View/").concat(this.uid): null; + }, + }, + } \ No newline at end of file diff --git a/public/js/components/Cis/Cms/StudiengangInformation/StudiengangVertretung.js b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangVertretung.js new file mode 100644 index 000000000..abb476c19 --- /dev/null +++ b/public/js/components/Cis/Cms/StudiengangInformation/StudiengangVertretung.js @@ -0,0 +1,32 @@ +export default { + props: { + title:String, + vertretungsList:Array, + showBezeichnung:Boolean, + }, + template:/*html*/` +
+
+ {{title}} +
+
+

+ + + + {{vertretungFormatedName(vertretung,false)}} +

+
+
+ `, + methods: { + profilViewLink: function (uid) { + return uid ? FHC_JS_DATA_STORAGE_OBJECT.app_root.concat(FHC_JS_DATA_STORAGE_OBJECT.ci_router).concat("/Cis/Profil/View/").concat(uid) : null; + }, + vertretungFormatedName: function (vertretung) { + if (!vertretung) return null; + return `${vertretung.vorname ?? ''} ${vertretung.nachname ?? ''} ${vertretung.bezeichnung && this.showBezeichnung ? '('.concat(vertretung.bezeichnung.replace("(", "").replace(")", "")).concat(")") : ''}` + }, + }, + +} \ No newline at end of file From 39ffd6bdb97b46b626986136900a621326350997 Mon Sep 17 00:00:00 2001 From: SimonGschnell Date: Fri, 6 Dec 2024 09:59:58 +0100 Subject: [PATCH 11/76] fix(news Widget api): readds the removed api call from the news widget because it differs from the getNews api call that is used in the News View --- .../controllers/api/frontend/v1/Cms.php | 1 - public/js/api/cms.js | 11 +++++++ public/js/components/DashboardWidget/News.js | 31 ++++++++++--------- 3 files changed, 27 insertions(+), 16 deletions(-) diff --git a/application/controllers/api/frontend/v1/Cms.php b/application/controllers/api/frontend/v1/Cms.php index f0d009534..50628bd4f 100644 --- a/application/controllers/api/frontend/v1/Cms.php +++ b/application/controllers/api/frontend/v1/Cms.php @@ -106,7 +106,6 @@ class Cms extends FHCAPI_Controller $this->terminateWithSuccess($content_id); } - //todo: there is the method news and getNews but only one should exist public function news() { diff --git a/public/js/api/cms.js b/public/js/api/cms.js index b80bb5cde..94ce24862 100644 --- a/public/js/api/cms.js +++ b/public/js/api/cms.js @@ -11,6 +11,7 @@ export default { ); }, + //api function used for the news View that renders the html getNews(page = 1, page_size = 10) { return this.$fhcApi.get( "/api/frontend/v1/Cms/getNews", @@ -21,6 +22,16 @@ export default { ); }, + //api function used for the widget component + news(limit) { + return this.$fhcApi.get( + "/api/frontend/v1/Cms/news", + { + limit: limit + } + ); + }, + getNewsRowCount: function () { return this.$fhcApi.get( "/api/frontend/v1/Cms/getNewsRowCount", diff --git a/public/js/components/DashboardWidget/News.js b/public/js/components/DashboardWidget/News.js index f774f0934..dcc721cd5 100644 --- a/public/js/components/DashboardWidget/News.js +++ b/public/js/components/DashboardWidget/News.js @@ -40,21 +40,6 @@ export default { return this.allNewsList.find(news => news.minimized === false) ?? this.allNewsList[0] ?? null } }, - created() { - this.$fhcApi.factory.cms - .news(MAX_LOADED_NEWS) - .then((res) => { - this.allNewsList = Array.from(Object.values(res.data)); - - this.selected = this.allNewsList.length ? this.allNewsList[0] : null - - }) - .catch((err) => { - console.error("ERROR: ", err.response.data); - }); - - this.$emit("setConfig", false); - }, methods: { setNext(){ const thisIndex = this.allNewsList.findIndex(n=>n.news_id == this.selected.news_id) @@ -133,6 +118,22 @@ export default { this.$refs.newsModal.show(); }, }, + created() { + this.$fhcApi.factory.cms + .news(MAX_LOADED_NEWS) + .then(res => res.data) + .then((news) => { + this.allNewsList = Array.from(Object.values(news)); + + this.selected = this.allNewsList.length ? this.allNewsList[0] : null + + }) + .catch((err) => { + console.error("ERROR: ", err.response.data); + }); + + this.$emit("setConfig", false); + }, template: /*html*/ `
From 9fd0f43d3b961b0fc40727c4e3468826e6cc7471 Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Fri, 6 Dec 2024 13:04:28 +0100 Subject: [PATCH 12/76] news widget prev/next button hover styles; mobile responsive menu & gutter layout fix; --- public/css/components/dashboard/news.css | 12 ++++++++++++ public/js/components/DashboardWidget/News.js | 13 ++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/public/css/components/dashboard/news.css b/public/css/components/dashboard/news.css index 742884371..9cb5f1c32 100644 --- a/public/css/components/dashboard/news.css +++ b/public/css/components/dashboard/news.css @@ -70,3 +70,15 @@ .fhc-carousel .carousel-item-end { transition: transform 0.44s ease-in-out, opacity 0.8s ease-in-out; } + +.carousel-control-prev, +.carousel-control-next { + opacity: 0; + transition: opacity 0.3s ease; +} + +/* Show the buttons when the carousel is hovered */ +.carousel:hover .carousel-control-prev, +.carousel:hover .carousel-control-next { + opacity: 1; +} diff --git a/public/js/components/DashboardWidget/News.js b/public/js/components/DashboardWidget/News.js index dcc721cd5..1c84f33ed 100644 --- a/public/js/components/DashboardWidget/News.js +++ b/public/js/components/DashboardWidget/News.js @@ -145,13 +145,13 @@ export default { {{ formatDateTime(news.insertamum) }}
-
- +