From bc484453041935f163a2b029a556aa7bffd98693 Mon Sep 17 00:00:00 2001 From: ma0048 Date: Mon, 10 Feb 2025 13:05:44 +0100 Subject: [PATCH 01/59] - infocenter filter fuer electronic onboarding hinzugefuegt --- .../system/infocenter/InfoCenter.php | 44 +++++++ .../views/system/infocenter/onboarding.php | 47 +++++++ .../system/infocenter/onboardingData.php | 116 ++++++++++++++++++ system/filtersupdate.php | 23 ++++ 4 files changed, 230 insertions(+) create mode 100644 application/views/system/infocenter/onboarding.php create mode 100644 application/views/system/infocenter/onboardingData.php diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index f6e41d2e6..9024088f8 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -22,6 +22,7 @@ class InfoCenter extends Auth_Controller const REIHUNGSTESTABSOLVIERT_PAGE = 'reihungstestAbsolviert'; const ABGEWIESEN_PAGE = 'abgewiesen'; const AUFGENOMMEN_PAGE = 'aufgenommen'; + const ONBOARDING_PAGE = 'onboarding'; const SHOW_DETAILS_PAGE = 'showDetails'; const SHOW_ZGV_DETAILS_PAGE = 'showZGVDetails'; const ZGV_UBERPRUEFUNG_PAGE = 'ZGVUeberpruefung'; @@ -116,6 +117,7 @@ class InfoCenter extends Auth_Controller 'index' => 'infocenter:r', 'freigegeben' => 'infocenter:r', 'abgewiesen' => 'infocenter:r', + 'onboarding' => 'infocenter:r', 'aufgenommen' => 'infocenter:r', 'reihungstestAbsolviert' => 'infocenter:r', 'showDetails' => 'infocenter:r', @@ -230,6 +232,13 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/infocenterAbgewiesen.php'); } + + public function onboarding() + { + $this->_setNavigationMenu(self::ONBOARDING_PAGE); // define the navigation menu for this page + + $this->load->view('system/infocenter/onboarding.php'); + } /** * Aufgenommene page of the InfoCenter tool @@ -1552,6 +1561,7 @@ class InfoCenter extends Auth_Controller $reihungstestAbsolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); $abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); $aufgenommenLink = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); + $onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); $currentFilterId = $this->input->get(self::FILTER_ID); if (isset($currentFilterId)) @@ -1560,6 +1570,7 @@ class InfoCenter extends Auth_Controller $reihungstestAbsolviertLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $abgewiesenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; $aufgenommenLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; + $onboardingLink .= '?'.self::PREV_FILTER_ID.'='.$currentFilterId; } $this->navigationlib->setSessionMenu( @@ -1623,6 +1634,18 @@ class InfoCenter extends Auth_Controller '', // target 40 // sort ), + 'ohnePrestudent' => $this->navigationlib->oneLevel( + 'Electronic Onboarding', // description + $onboardingLink, // link + null, // children + 'users', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 50 // sort + ), ) ); } @@ -1649,6 +1672,8 @@ class InfoCenter extends Auth_Controller $link = site_url(self::ZGV_UEBERPRUEFUNG_URI); if ($origin_page === self::ABGEWIESEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + if ($origin_page === self::ONBOARDING_PAGE) + $link = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); if ($origin_page === self::AUFGENOMMEN_PAGE) $link = site_url(self::INFOCENTER_URI.'/'.self::AUFGENOMMEN_PAGE); @@ -1690,6 +1715,7 @@ class InfoCenter extends Auth_Controller $freigegebenLink = site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE); $absolviertLink = site_url(self::INFOCENTER_URI.'/'.self::REIHUNGSTESTABSOLVIERT_PAGE); $abgewiesenLink = site_url(self::INFOCENTER_URI.'/'.self::ABGEWIESEN_PAGE); + $onboardingLink = site_url(self::INFOCENTER_URI.'/'.self::ONBOARDING_PAGE); $prevFilterId = $this->input->get(self::PREV_FILTER_ID); if (isset($prevFilterId)) { @@ -1766,6 +1792,24 @@ class InfoCenter extends Auth_Controller ) ); } + if($page == self::ONBOARDING_PAGE) + { + $this->navigationlib->setSessionElementMenu( + 'onboarding', + $this->navigationlib->oneLevel( + 'Electronic Onboarding', // description + $onboardingLink, // link + null, // children + 'users', // icon + null, // subscriptDescription + false, // expand + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 50 // sort + ) + ); + } } /** diff --git a/application/views/system/infocenter/onboarding.php b/application/views/system/infocenter/onboarding.php new file mode 100644 index 000000000..a600364d9 --- /dev/null +++ b/application/views/system/infocenter/onboarding.php @@ -0,0 +1,47 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'Info Center', + 'jquery3' => true, + 'jqueryui1' => true, + 'jquerycheckboxes1' => true, + 'bootstrap3' => true, + 'fontawesome4' => true, + 'sbadmintemplate3' => true, + 'tablesorter2' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, + 'dialoglib' => true, + 'phrases' => array( + 'person' => array('vorname', 'nachname'), + 'ui' => array('bitteEintragWaehlen') + ), + 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + ) + ); +?> + +
+ + widgetlib->widget('NavigationWidget'); ?> + +
+
+
+
+ +
+
+
+ load->view('system/infocenter/onboardingData.php'); ?> +
+
+
+
+ +load->view('templates/FHC-Footer'); ?> diff --git a/application/views/system/infocenter/onboardingData.php b/application/views/system/infocenter/onboardingData.php new file mode 100644 index 000000000..5ee66fdde --- /dev/null +++ b/application/views/system/infocenter/onboardingData.php @@ -0,0 +1,116 @@ +>0 as bezeichnung + FROM public.tbl_rueckstellung + JOIN public.tbl_rueckstellung_status USING(status_kurzbz) + JOIN public.tbl_person sp ON tbl_rueckstellung.person_id = sp.person_id + WHERE tbl_rueckstellung.rueckstellung_id = + ( + SELECT srueck.rueckstellung_id + FROM public.tbl_rueckstellung srueck + WHERE srueck.person_id = tbl_rueckstellung.person_id + AND datum_bis >= NOW() + ORDER BY srueck.datum_bis DESC LIMIT 1 + ) + ) rueck ON rueck.person_id = p.person_id + WHERE p.person_id NOT IN (SELECT person_id FROM public.tbl_prestudent)'; + + $filterWidgetArray = array( + 'query' => $query, + 'app' => InfoCenter::APP, + 'datasetName' => 'onboarding', + 'filter_id' => $this->input->get('filter_id'), + 'requiredPermissions' => 'infocenter', + 'datasetRepresentation' => 'tablesorter', + 'checkboxes' => 'PersonId', + 'additionalColumns' => array('Details'), + 'columnsAliases' => array( + 'PersonId', + ucfirst($this->p->t('person', 'vorname')) , + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('global', 'sperrdatum')), + ucfirst($this->p->t('global', 'gesperrtVon')), + ucfirst($this->p->t('infocenter', 'rueckstelldatum')), + ucfirst($this->p->t('infocenter', 'rueckstellgrund')), + ), + + 'formatRow' => function($datasetRaw) { + /* NOTE: Dont use $this here for PHP Version compatibility */ + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + 'onboarding', + (isset($_GET['fhc_controller_id']) ? $_GET['fhc_controller_id'] : ''), + (isset($_GET['filter_id']) ? $_GET['filter_id'] : '') + ); + + if ($datasetRaw->{'LockDate'} == null) + { + $datasetRaw->{'LockDate'} = '-'; + } + + if ($datasetRaw->{'LockUser'} == null) + { + $datasetRaw->{'LockUser'} = '-'; + } + + if ($datasetRaw->{'HoldDate'} == null) + { + $datasetRaw->{'HoldDate'} = '-'; + } + else + { + $datasetRaw->{'HoldDate'} = date_format(date_create($datasetRaw->{'HoldDate'}), 'Y-m-d H:i'); + } + + if ($datasetRaw->{'Rueckstellgrund'} === null) + { + $datasetRaw->{'Rueckstellgrund'} = '-'; + } + + return $datasetRaw; + }, + + 'markRow' => function($datasetRaw) { + + if ($datasetRaw->LockDate != null) + { + return FilterWidget::DEFAULT_MARK_ROW_CLASS; + } + } + + + + ); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/system/filtersupdate.php b/system/filtersupdate.php index 51dd86314..cfcceb0f6 100644 --- a/system/filtersupdate.php +++ b/system/filtersupdate.php @@ -529,6 +529,29 @@ $filters = array( ', 'oe_kurzbz' => null, ), + array( + 'app' => 'infocenter', + 'dataset_name' => 'onboarding', + 'filter_kurzbz' => 'InfoCenterOnboarding', + 'description' => '{Alle}', + 'sort' => 1, + 'default_filter' => true, + 'filter' => ' + { + "name": "Electronic Onboarding - Alle", + "columns": [ + {"name": "PersonId"}, + {"name": "Vorname"}, + {"name": "Nachname"}, + {"name": "LockUser"}, + {"name": "HoldDate"}, + {"name": "Rueckstellgrund"} + ], + "filters": [] + } + ', + 'oe_kurzbz' => null, + ), array( 'app' => 'infocenter', 'dataset_name' => 'aufgenommen', From 02df06288e7590e04c4fed0799651687d19cb05d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20=C3=96sterreicher?= Date: Mon, 16 Jun 2025 11:37:04 +0200 Subject: [PATCH 02/59] =?UTF-8?q?Bugfix=20R=C3=BCckstellgrund?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/views/system/infocenter/onboarding.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/views/system/infocenter/onboarding.php b/application/views/system/infocenter/onboarding.php index a600364d9..1f5bae847 100644 --- a/application/views/system/infocenter/onboarding.php +++ b/application/views/system/infocenter/onboarding.php @@ -19,7 +19,7 @@ 'ui' => array('bitteEintragWaehlen') ), 'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css', 'public/css/infocenter/infocenterPersonDataset.css'), - 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') + 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/rueckstellung.js', 'public/js/infocenter/infocenterPersonDataset.js') ) ); ?> From 1fbca8bdab52adf77632ab029679d51c04da7eb9 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Fri, 17 Oct 2025 10:14:47 +0200 Subject: [PATCH 03/59] Bugfix: Add overflow for horizontal scrolling --- public/js/components/Calendar/Base/Grid.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/components/Calendar/Base/Grid.js b/public/js/components/Calendar/Base/Grid.js index c232dd955..3418a9151 100644 --- a/public/js/components/Calendar/Base/Grid.js +++ b/public/js/components/Calendar/Base/Grid.js @@ -316,7 +316,7 @@ export default { template: /* html */`
Date: Wed, 22 Oct 2025 10:23:24 +0200 Subject: [PATCH 04/59] new Multitab CombinePeople, start Function --- application/config/stv.php | 1 + .../api/frontend/v1/stv/Config.php | 4 ++ .../Details/CombinePeople.js | 57 +++++++++++++++++++ system/phrasesupdate.php | 22 ++++++- 4 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js diff --git a/application/config/stv.php b/application/config/stv.php index 42afc318c..d6d06f44e 100644 --- a/application/config/stv.php +++ b/application/config/stv.php @@ -111,5 +111,6 @@ $config['students_tab_order'] = [ 'status', 'groups', 'finalexam', + 'combinePeople', 'archive', ]; diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index d52016943..20e43d23a 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -228,6 +228,10 @@ class Config extends FHCAPI_Controller 'showEdit' => $this->permissionlib->isBerechtigt('admin') ] ]; + $result['combinePeople'] = [ + 'title' => $this->p->t('stv', 'tab_combine_people'), + 'component' => './Stv/Studentenverwaltung/Details/CombinePeople.js', + ]; Events::trigger('stv_conf_students', function & () use (&$result) { return $result; diff --git a/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js new file mode 100644 index 000000000..4374687fe --- /dev/null +++ b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js @@ -0,0 +1,57 @@ +export default { + name: "TabCombinePeople", + inject: { + cisRoot: { + from: 'cisRoot' + }, + }, + props: { + modelValue: Object, + }, + computed: { + personIds(){ + if (this.modelValue.person_id) { + return [this.modelValue.person_id]; + } + return this.modelValue.map(e => e.person_id); + } + }, + methods: { + combinePeople(){ + + let person1_id = this.personIds[0]; + let person2_id = this.personIds[1]; + + if(person1_id == person2_id) { + return this.$fhcAlert.alertError("gleiche Person, keine Zusammenlegeung möglich"); + } + + let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; + + console.log(linkCombinePeople); + window.open(linkCombinePeople, '_blank'); + + + } + }, + data(){ + return {} + }, + template: /*html*/ ` +
+

Personen zusammenlegen

+ + {{personIds}} + +
+ +

+ +

+

+ ungültige Anzahl: {{this.modelValue.length}} +

+
+
+ ` + }; \ No newline at end of file diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 5d3833dc9..d931f85c2 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -49982,7 +49982,27 @@ I have been informed that I am under no obligation to consent to the transmissio 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'core', + 'category' => 'stv', + 'phrase' => 'tab_combine_people', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Personen zusammenlegen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Combine People', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), ); From 9ed3251e5556427661121fecd713c3a9d5583243 Mon Sep 17 00:00:00 2001 From: ma0068 Date: Thu, 23 Oct 2025 12:55:14 +0200 Subject: [PATCH 05/59] open in iframe, only show tab if count in config is valid --- application/config/stv.php | 6 +- .../api/frontend/v1/stv/Config.php | 1 + .../Details/CombinePeople.js | 75 +++++++++++++------ public/js/components/Tabs.js | 62 ++++++++++++++- 4 files changed, 119 insertions(+), 25 deletions(-) diff --git a/application/config/stv.php b/application/config/stv.php index d6d06f44e..000242ac5 100644 --- a/application/config/stv.php +++ b/application/config/stv.php @@ -61,7 +61,11 @@ $config['tabs'] = 'notes' => [ //if true, the count of Messages will be shown in the header of the Tab Messages 'showCountNotes' => true - ] + ], + 'combinePeople' => [ + //multitab should only be shown with this length of selection + 'validCountMulti' => 2, + ], ]; // List of fields to show when ZGV_DOKTOR_ANZEIGEN is defined diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php index 20e43d23a..67b71c36d 100644 --- a/application/controllers/api/frontend/v1/stv/Config.php +++ b/application/controllers/api/frontend/v1/stv/Config.php @@ -231,6 +231,7 @@ class Config extends FHCAPI_Controller $result['combinePeople'] = [ 'title' => $this->p->t('stv', 'tab_combine_people'), 'component' => './Stv/Studentenverwaltung/Details/CombinePeople.js', + 'config' => $config['combinePeople'] ]; Events::trigger('stv_conf_students', function & () use (&$result) { diff --git a/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js index 4374687fe..facf8848f 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js +++ b/public/js/components/Stv/Studentenverwaltung/Details/CombinePeople.js @@ -8,50 +8,83 @@ export default { props: { modelValue: Object, }, + data(){ + return { + iframeUrl: null, + viewLoaded: false + } + }, computed: { personIds(){ if (this.modelValue.person_id) { return [this.modelValue.person_id]; } return this.modelValue.map(e => e.person_id); - } + }, + detailStringPerson1(){ + let person1 = this.modelValue[0]; + return person1.vorname + " " + person1.nachname + "(" + person1.person_id + ")"; + }, + detailStringPerson2(){ + let person2 = this.modelValue[1]; + return person2.vorname + " " + person2.nachname + "(" + person2.person_id+ ")"; + }, + }, methods: { combinePeople(){ - + this.viewLoaded = true; let person1_id = this.personIds[0]; let person2_id = this.personIds[1]; if(person1_id == person2_id) { - return this.$fhcAlert.alertError("gleiche Person, keine Zusammenlegeung möglich"); + //TODO(Manu) Phrase + return this.$fhcAlert.alertError("gleiche Person, keine Zusammenlegung möglich"); } - let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; + // let linkCombinePeople = this.cisRoot + 'vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; + let linkCombinePeople = 'https://c3p0.ma0068.technikum-wien.at/fhcomplete/vilesci/stammdaten/personen_wartung.php?person_id_1=' + person1_id + '&person_id_2='+ person2_id; console.log(linkCombinePeople); - window.open(linkCombinePeople, '_blank'); - - + //window.open(linkCombinePeople, '_blank'); + this.openLink(linkCombinePeople); + }, + openLink(url) { + this.iframeUrl = url; + }, + goBack(){ + this.viewLoaded = false; + this.iframeUrl = null; } }, - data(){ - return {} - }, template: /*html*/ `
-

Personen zusammenlegen

- {{personIds}} - -
- -

- -

-

- ungültige Anzahl: {{this.modelValue.length}} -

+
+

Personen zusammenlegen

+
+
+ +

Die Personen {{detailStringPerson1}} und {{detailStringPerson2}} zusammenlegen?

+ +
+
+ ungültige Anzahl: {{this.modelValue.length}} +
+
+
+ +
+ + + +
` }; \ No newline at end of file diff --git a/public/js/components/Tabs.js b/public/js/components/Tabs.js index aedd5c1c9..5db8d66ba 100644 --- a/public/js/components/Tabs.js +++ b/public/js/components/Tabs.js @@ -33,7 +33,8 @@ export default { data() { return { current: null, - tabs: {} + tabs: {}, + count: null } }, computed: { @@ -113,10 +114,12 @@ export default { }; } - if (Array.isArray(config)) + if (Array.isArray(config)) { config.forEach((item, key) => _addToTabs(key, item)); - else + } + else { Object.entries(config).forEach(([key, item]) => _addToTabs(key, item)); + } if (this.current === null || !tabs[this.current]) { if (tabs[this.default]) @@ -129,6 +132,57 @@ export default { updateSuffix() { this.getTabSuffix(this.currentTab); }, + removeInvalidCountTabs(){ + if(this.modelValue.length) + { + let countIst = this.modelValue.length; + const tabsToDelete = []; + + Object.entries(this.config).forEach(([key, item]) => { + + const target = item?.config ? item : item?.value || item; + + // check config for validCountMulti + if (target.config?.validCountMulti !== undefined) { + let tab; + let countSoll; + tab = key; + countSoll = target.config.validCountMulti; + + //check if tab is existing + if (countSoll !== undefined && countSoll == countIst) { + //add tab if it was removed before + if (tab in this.tabs == false) { + const value = Vue.reactive({ + suffix: '', + showSuffix: item.showSuffix || false + }); + + this.tabs[tab] = { + component: Vue.markRaw(Vue.defineAsyncComponent(() => import(item.component))), + title: Vue.computed(() => item.title || tab), + config: item.config, + tab, + value, + suffixhelper: item.suffixhelper ?? null + }; + } + } + + //add to toDeleteArray if count is not allowed + if (countSoll !== undefined && countSoll !== countIst) { + tabsToDelete.push(tab); + } + } + }); + + // Delete all tabs with count not allowed + tabsToDelete.forEach(k => { + delete this.tabs[k]; + }); + + } + }, async getTabSuffix(tab) { if (!tab.value.showSuffix) { return; @@ -151,9 +205,11 @@ export default { }, mounted() { this.getTabSuffixes(); + this.removeInvalidCountTabs(); }, updated() { this.getTabSuffixes(); + this.removeInvalidCountTabs(); }, template: `