From 7edddd0566b739716fc3631747feefd64dc3432f Mon Sep 17 00:00:00 2001 From: adisposkofh Date: Tue, 14 Apr 2026 14:19:38 +0200 Subject: [PATCH] removed redundant OverviewLvPlan page (same as StgOrgLvPlan) --- application/config/routes.php | 3 +- .../controllers/Cis/OverviewLvPlan.php | 39 ---- public/js/apps/Dashboard/Fhc.js | 10 - .../components/Cis/LvPlan/OverviewLvPlan.js | 194 ------------------ 4 files changed, 1 insertion(+), 245 deletions(-) delete mode 100644 application/controllers/Cis/OverviewLvPlan.php delete mode 100644 public/js/components/Cis/LvPlan/OverviewLvPlan.js diff --git a/application/config/routes.php b/application/config/routes.php index f397a2007..8024f449a 100644 --- a/application/config/routes.php +++ b/application/config/routes.php @@ -65,9 +65,8 @@ $route['Cis/LvPlan/.*'] = 'Cis/LvPlan/index/$1'; $route['Cis/MyLvPlan/.*'] = 'Cis/MyLvPlan/index/$1'; $route['Cis/MyLv/.*'] = 'Cis/MyLv/index/$1'; $route['Cis/OtherLvPlan/.*'] = 'Cis/OtherLvPlan/index/$1'; -//Routes for Lvplan Verband and page for dropdown Stg/Semester/Verband/Gruppe +//Route for LV Plan Stg/Semester/Verband/Gruppe $route['Cis/StgOrgLvPlan/.*'] = 'Cis/StgOrgLvPlan/index/$1'; -$route['Cis/OverviewLvPlan/.*'] = 'Cis/OverviewLvPlan/index/$1'; $route['Abgabetool/Assistenz'] = 'Cis/Abgabetool/Assistenz'; $route['Abgabetool/Assistenz/(:any)'] = 'Cis/Abgabetool/Assistenz/$1'; diff --git a/application/controllers/Cis/OverviewLvPlan.php b/application/controllers/Cis/OverviewLvPlan.php deleted file mode 100644 index 5fe9d9779..000000000 --- a/application/controllers/Cis/OverviewLvPlan.php +++ /dev/null @@ -1,39 +0,0 @@ - ['basis/cis:r'] - ]); - - // Load Config - $this->load->config('calendar'); - } - - // ----------------------------------------------------------------------------------------------------------------- - // Public methods - - /** - * @return void - */ - public function index() - { - - $viewData = array( - 'uid'=>getAuthUID(), - 'timezone' => $this->config->item('timezone') - ); - - $this->load->view('CisRouterView/CisRouterView.php', ['viewData' => $viewData, 'route' => 'OverviewLvPlan']); - } -} \ No newline at end of file diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index 613cd28f8..7c39f59f8 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -210,16 +210,6 @@ const router = VueRouter.createRouter({ }; } }, - { - path: `/Cis/OverviewLvPlan`, - name: 'OverviewLvPlan', - component: OverviewLvPlan, - props(route) { - return { - propsViewData: route.params - }; - } - }, { path: `/Cis/OtherLvPlan/:otherUid/:mode?/:focus_date?`, name: "OtherLvPlan", diff --git a/public/js/components/Cis/LvPlan/OverviewLvPlan.js b/public/js/components/Cis/LvPlan/OverviewLvPlan.js deleted file mode 100644 index 01615ab60..000000000 --- a/public/js/components/Cis/LvPlan/OverviewLvPlan.js +++ /dev/null @@ -1,194 +0,0 @@ -import FormForm from '../../Form/Form.js'; -import FormInput from '../../Form/Input.js'; - -import ApiLvPlan from '../../../api/factory/lvPlan.js'; - -export default { - name: "OverviewLvPlan", - components: { - FormForm, - FormInput, - }, - props: { - viewData: Object, - propsViewData: Object - }, - data() { - return { - formData: { - stgkz: null, - sem: null, - verband: null, - gruppe: null, - }, - listStg: [], - listSem: [1,2,3,4,5,6,7,8,9,10], - listVerband: [], - listGroup: [], - }; - }, - methods: { - loadLvPlan() { - if (!this.formData.stgkz) { - this.$fhcAlert.alertError(this.$p.t('LvPlan', 'chooseStg')); - return; - } - if (!this.formData.sem && (this.formData.verband || this.formData.gruppe)) { - this.$fhcAlert.alertError(this.$p.t('LvPlan', 'error_SemMissing')); - return; - } - - if (!this.formData.verband && this.formData.gruppe) { - this.$fhcAlert.alertError(this.$p.t('LvPlan', 'error_VerbandMissing')); - return; - } - - const params = { - mode: this.currentMode, - focus_date: this.currentDay, - stgkz: this.formData.stgkz, - sem: this.formData.sem, - verband: this.formData.verband, - gruppe: this.formData.gruppe, - }; - - //ensure logic: no value after a null value in route - if (params.sem == null) { - params.verband = null; - params.gruppe = null; - } - if (params.verband == null) { - params.gruppe = null; - } - - //delete all null values to avoid null in router - Object.keys(params).forEach( - key => params[key] == null && delete params[key] - ); - - this.$router.push({ - name: "StgOrgLvPlan", - params, - }); - }, - loadListSem(){ - this.listSem = [...Array(this.maxSemester).keys()].map(i => i + 1); - }, - loadListVerband(){ - this.$api - .call(ApiLvPlan.getLehrverband(this.formData.stgkz, this.formData.sem, this.formData.verband)) - .then(result => { - const data = result.data; - const mappedData = data.map(item => item.verband); - this.listVerband = [...new Set(mappedData.filter(v => - v !== null && - v !== undefined && - String(v).trim() !== "" - ))] - .sort(); - }) - .catch(this.$fhcAlert.handleSystemError); - }, - loadListGroup(){ - this.$api - .call(ApiLvPlan.getGruppe(this.formData.stgkz, this.formData.sem, this.formData.verband)) - .then(result => { - const data = result.data; - const mappedData = data.map(item => item.gruppe); - this.listGroup = [...new Set(mappedData.filter(v => - v !== null && - v !== undefined && - String(v).trim() !== ""))] - .sort(); - }) - .catch(this.$fhcAlert.handleSystemError); - } - }, - computed: { - maxSemester(){ - const currentStg = this.listStg.find( - item => item.studiengang_kz === this.formData.stgkz - ); - return currentStg.max_semester; - }, - currentDay() { - if (!this.propsViewData?.focus_date || isNaN(new Date(this.propsViewData?.focus_date))) - return luxon.DateTime.now().setZone(this.viewData.timezone).toISODate(); - return this.propsViewData?.focus_date; - }, - }, - created(){ - this.$api - .call(ApiLvPlan.getStudiengaenge()) - .then(result => { - this. listStg = result.data; - }) - .catch(this.$fhcAlert.handleSystemError); - }, - template: ` -
-
- - - - - - - - - - - - - - - - - - - - -
-
- `, -};