diff --git a/application/controllers/api/frontend/v1/stv/Student.php b/application/controllers/api/frontend/v1/stv/Student.php index f805be88a..f24ef62bb 100644 --- a/application/controllers/api/frontend/v1/stv/Student.php +++ b/application/controllers/api/frontend/v1/stv/Student.php @@ -156,6 +156,8 @@ class Student extends FHCAPI_Controller $uid = $student ? current($student)->student_uid : null; + $studiengang_kz = $student ? current($student)->studiengang_kz : null; + $result = $this->PrestudentModel->loadWhere(['prestudent_id' => $prestudent_id]); $person = $this->getDataOrTerminateWithError($result); @@ -231,10 +233,27 @@ class Student extends FHCAPI_Controller // Do Updates if (count($update_lehrverband)) { - $result = $this->StudentlehrverbandModel->update([ + $curstudlvb = $this->StudentlehrverbandModel->load([ 'studiensemester_kurzbz' => $studiensemester_kurzbz, 'student_uid' => $uid - ], $update_lehrverband); + ]); + + if(hasData($curstudlvb) && count(getData($curstudlvb)) > 0 ) + { + $result = $this->StudentlehrverbandModel->update([ + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'student_uid' => $uid + ], $update_lehrverband); + } + else + { + $result = $this->StudentlehrverbandModel->insert(array_merge([ + 'studiensemester_kurzbz' => $studiensemester_kurzbz, + 'student_uid' => $uid, + 'studiengang_kz' => $studiengang_kz + ], $update_lehrverband)); + } + $this->getDataOrTerminateWithError($result); } diff --git a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php index 6827beaa4..f81a2d518 100644 --- a/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php +++ b/application/models/vertragsbestandteil/Dienstverhaeltnis_model.php @@ -59,7 +59,14 @@ class Dienstverhaeltnis_model extends DB_Model } $qry .=" - ORDER BY dv.von desc + ORDER BY + CASE + WHEN (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) < 0 THEN NULL + ELSE + (COALESCE(dv.bis, '2999-12-31'::date) - NOW()::date) + END ASC NULLS LAST, + COALESCE(dv.bis, '2999-12-31'::date) DESC, + dv.von DESC "; return $this->execQuery($qry, $data); diff --git a/application/views/system/infocenter/infocenterFreigegebenData.php b/application/views/system/infocenter/infocenterFreigegebenData.php index 27738719c..38285b6ae 100644 --- a/application/views/system/infocenter/infocenterFreigegebenData.php +++ b/application/views/system/infocenter/infocenterFreigegebenData.php @@ -112,7 +112,7 @@ $query = ' LIMIT 1 ) AS "AnzahlAbgeschickt", ( - SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz), \', \') + SELECT ARRAY_TO_STRING(ARRAY_AGG(DISTINCT UPPER(so.studiengangkurzbzlang) || \':\' || sp.orgform_kurzbz || \' [\' || pss.ausbildungssemester || \']\'), \', \') FROM public.tbl_prestudentstatus pss JOIN public.tbl_prestudent ps USING(prestudent_id) JOIN public.tbl_studiengang sg USING(studiengang_kz) diff --git a/cis/testtool/frage.php b/cis/testtool/frage.php index 0aa37b299..c38229cdf 100644 --- a/cis/testtool/frage.php +++ b/cis/testtool/frage.php @@ -148,7 +148,7 @@ echo ' alert(t("testtool/alleFragenBeantwortet")."'"?>); return true; } - + $(document).ready(function () { $(document).bind('cut copy paste', function(e) { @@ -717,7 +717,7 @@ if($frage->frage_id!='') if(!$demo) { - echo ''; + echo ''; } else { diff --git a/public/js/api/factory/addons.js b/public/js/api/factory/addons.js new file mode 100644 index 000000000..23fd19e39 --- /dev/null +++ b/public/js/api/factory/addons.js @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getLvMenu(lvid, studiensemester_kurzbz) { + return { + method: 'get', + url: `/api/frontend/v1/LvMenu/getLvMenu/${lvid}/${studiensemester_kurzbz}` + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/authinfo.js b/public/js/api/factory/authinfo.js new file mode 100644 index 000000000..5cf88604f --- /dev/null +++ b/public/js/api/factory/authinfo.js @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getAuthUID() { + return { + method: 'get', + url: '/api/frontend/v1/AuthInfo/getAuthUID' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/betriebsmittel.js b/public/js/api/factory/betriebsmittel.js new file mode 100644 index 000000000..bc007a20e --- /dev/null +++ b/public/js/api/factory/betriebsmittel.js @@ -0,0 +1,22 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import person from "./betriebsmittel/person.js"; + +export default { + person +}; diff --git a/public/js/api/factory/betriebsmittel/person.js b/public/js/api/factory/betriebsmittel/person.js new file mode 100644 index 000000000..912a5df31 --- /dev/null +++ b/public/js/api/factory/betriebsmittel/person.js @@ -0,0 +1,63 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getAllBetriebsmittel(type, id) { + return { + method: 'get', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/getAllBetriebsmittel/' + type + '/' + id + }; + }, + addNewBetriebsmittel(person_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/addNewBetriebsmittel/' + person_id, + params + }; + }, + loadBetriebsmittel(betriebsmittelperson_id) { + return { + method: 'post', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/loadBetriebsmittel/' + betriebsmittelperson_id + }; + }, + updateBetriebsmittel(betriebsmittelperson_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/updateBetriebsmittel/' + betriebsmittelperson_id, + params + }; + }, + deleteBetriebsmittel(betriebsmittelperson_id) { + return { + method: 'post', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/deleteBetriebsmittel/' + betriebsmittelperson_id + }; + }, + getTypenBetriebsmittel() { + return { + method: 'get', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/getTypenBetriebsmittel/' + }; + }, + loadInventarliste(query) { + return { + method: 'get', + url: 'api/frontend/v1/betriebsmittel/betriebsmittelP/loadInventarliste/' + query + }; + } +}; diff --git a/public/js/api/factory/checkperson.js b/public/js/api/factory/checkperson.js new file mode 100644 index 000000000..dc5546cf5 --- /dev/null +++ b/public/js/api/factory/checkperson.js @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + updatePersonUnrulyStatus(person_id, unruly) { + const params = { person_id, unruly } + const url = '/api/frontend/v1/checkperson/CheckPerson/updatePersonUnrulyStatus'; + return { + method: 'post', + url, + params + }; + }, + filterPerson(params, base = '') { + // TODO(chris): seems to be called from nowhere? + const url = base + '/api/frontend/v1/checkperson/CheckPerson/filterPerson'; + return { + method: 'post', + url, + params + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/cis/dashboard.js b/public/js/api/factory/cis/dashboard.js new file mode 100644 index 000000000..cb1ec16bb --- /dev/null +++ b/public/js/api/factory/cis/dashboard.js @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getViewData() { + return { + method: 'get', + url: '/api/frontend/v1/Cis4FhcApi/getViewData' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/cis/menu.js b/public/js/api/factory/cis/menu.js new file mode 100644 index 000000000..829c5ff04 --- /dev/null +++ b/public/js/api/factory/cis/menu.js @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getMenu() { + return { + method: 'get', + url: '/api/frontend/v1/CisMenu/getMenu' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/cms.js b/public/js/api/factory/cms.js new file mode 100644 index 000000000..59ad4af5a --- /dev/null +++ b/public/js/api/factory/cms.js @@ -0,0 +1,64 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + content(content_id, version=null, sprache=null, sichtbar=null) { + return { + method: 'get', + url: '/api/frontend/v1/Cms/content', + params: { + content_id, + ...(version ? { version } : {}), + ...(sprache ? { sprache } : {}), + ...(sichtbar ? { sichtbar } : {}) + } + }; + }, + //api function used for the news View that renders the html + getNews(page = 1, page_size = 10, sprache) { + return { + method: 'get', + url: '/api/frontend/v1/Cms/getNews', + params: { + page, + page_size, + sprache + }, + }; + }, + //api function used for the widget component + news(limit) { + return { + method: 'get', + url: '/api/frontend/v1/Cms/news', + params: { limit } + }; + }, + getNewsRowCount() { + return { + method: 'get', + url: '/api/frontend/v1/Cms/getNewsRowCount' + }; + }, + getNewsExtra() { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Cms/getStudiengangInfoForNews' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/filter.js b/public/js/api/factory/filter.js new file mode 100644 index 000000000..5207fe1cf --- /dev/null +++ b/public/js/api/factory/filter.js @@ -0,0 +1,95 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + saveCustomFilter(wsParams) { + return { + method: 'post', + url: '/api/frontend/v1/filter/saveCustomFilter', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + customFilterName: wsParams.customFilterName + } + }; + }, + removeCustomFilter(wsParams) { + return { + method: 'post', + url: '/api/frontend/v1/filter/removeCustomFilter', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + filterId: wsParams.filterId + } + }; + }, + applyFilterFields(wsParams) { + return { + method: 'post', + url: '/api/frontend/v1/filter/applyFilterFields', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + filterFields: wsParams.filterFields + } + }; + }, + addFilterField(wsParams) { + return { + method: 'post', + url: '/api/frontend/v1/filter/addFilterField', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + filterField: wsParams.filterField + } + }; + }, + removeFilterField(wsParams) { + return { + method: 'post', + url: '/api/frontend/v1/filter/removeFilterField', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + filterField: wsParams.filterField + } + }; + }, + getFilterById(wsParams) { + return { + method: 'get', + url: '/api/frontend/v1/filter/getFilter', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType, + filterId: wsParams.filterId + } + }; + }, + getFilter(wsParams) { + return { + method: 'get', + url: '/api/frontend/v1/filter/getFilter', + params: { + filterUniqueId: wsParams.filterUniqueId, + filterType: wsParams.filterType + } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/lehre.js b/public/js/api/factory/lehre.js new file mode 100644 index 000000000..84c8e8662 --- /dev/null +++ b/public/js/api/factory/lehre.js @@ -0,0 +1,39 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getStudentenMail(lehreinheit_id) { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Lehre/lvStudentenMail', + params: { lehreinheit_id } + }; + }, + getLvInfo(studiensemester_kurzbz, lehrveranstaltung_id) { + return { + method: 'get', + url: `/api/frontend/v1/Lehre/LV/${studiensemester_kurzbz}/${lehrveranstaltung_id}` + }; + }, + getStudentPruefungen(lehrveranstaltung_id) { + return { + method: 'get', + url: `/api/frontend/v1/Lehre/Pruefungen/${lehrveranstaltung_id}` + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/navigation.js b/public/js/api/factory/navigation.js new file mode 100644 index 000000000..896801dd7 --- /dev/null +++ b/public/js/api/factory/navigation.js @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getHeader(navigation_page) { + return { + method: 'get', + url: '/api/frontend/v1/navigation/header', + params: { navigation_page } + }; + }, + getMenu(navigation_page) { + return { + method: 'get', + url: '/api/frontend/v1/navigation/menu', + params: { navigation_page } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/notiz.js b/public/js/api/factory/notiz.js new file mode 100644 index 000000000..074d4b6a5 --- /dev/null +++ b/public/js/api/factory/notiz.js @@ -0,0 +1,22 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import person from "./notiz/person.js"; + +export default { + person +}; diff --git a/public/js/api/factory/notiz/person.js b/public/js/api/factory/notiz/person.js new file mode 100644 index 000000000..33b572d1a --- /dev/null +++ b/public/js/api/factory/notiz/person.js @@ -0,0 +1,87 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getNotizen(id, type) { + return { + method: 'get', + url: 'api/frontend/v1/notiz/notizPerson/getNotizen/' + id + '/' + type + }; + }, + getUid() { + return { + method: 'get', + url: 'api/frontend/v1/notiz/notizPerson/getUid/' + }; + }, + addNewNotiz(id, params) { + return { + method: 'post', + url: 'api/frontend/v1/notiz/notizPerson/addNewNotiz/' + id, + params + }; + }, + loadNotiz(notiz_id) { + return { + method: 'post', + url: 'api/frontend/v1/notiz/notizPerson/loadNotiz/', + params: { + notiz_id + } + }; + }, + loadDokumente(notiz_id) { + return { + method: 'post', + url: 'api/frontend/v1/notiz/notizPerson/loadDokumente/', + params: { + notiz_id + } + }; + }, + deleteNotiz(notiz_id, type_id, id) { + return { + method: 'post', + url: 'api/frontend/v1/notiz/notizPerson/deleteNotiz/', + params: { + notiz_id, + type_id, + id + } + }; + }, + updateNotiz(notiz_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/notiz/notizPerson/updateNotiz/' + notiz_id, + params + }; + }, + getMitarbeiter(event) { + return { + method: 'get', + url: 'api/frontend/v1/notiz/notizPerson/getMitarbeiter/' + event + }; + }, + isBerechtigt(id, type_id) { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: 'api/frontend/v1/notiz/notizPerson/isBerechtigt/' + }; + } +}; diff --git a/public/js/api/factory/ort.js b/public/js/api/factory/ort.js new file mode 100644 index 000000000..90488df1b --- /dev/null +++ b/public/js/api/factory/ort.js @@ -0,0 +1,26 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getContentID(ort_kurbz) { + return { + method: 'get', + url: '/api/frontend/v1/Ort/ContentID', + params: { ort_kurzbz: ort_kurbz } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/phrasen.js b/public/js/api/factory/phrasen.js new file mode 100644 index 000000000..a87e4f4be --- /dev/null +++ b/public/js/api/factory/phrasen.js @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + loadCategory(category) { + return { + method: 'get', + url: '/api/frontend/v1/phrasen/loadModule/' + category + }; + }, + setLanguage(categories,language) { + const params = {categories, language} + return { + method: 'post', + url: '/api/frontend/v1/phrasen/setLanguage', + params + }; + }, + getLanguage() { + return { + method: 'get', + url: '/api/frontend/v1/phrasen/getLanguage' + }; + }, + getActiveDbLanguages() { + return { + method: 'get', + url: '/api/frontend/v1/phrasen/getAllLanguages' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/profil.js b/public/js/api/factory/profil.js new file mode 100644 index 000000000..5da1f202d --- /dev/null +++ b/public/js/api/factory/profil.js @@ -0,0 +1,73 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getView(uid) { + return { + method: 'get', + url: `/api/frontend/v1/Profil/getView/${uid}` + }; + }, + fotoSperre(value) { + return { + method: 'get', + url: `/api/frontend/v1/Profil/fotoSperre/${value}` + }; + + }, + isStudent(uid) { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Profil/isStudent', + params: { uid } + }; + }, + isMitarbeiter(uid) { + return { + method: 'get', + url: `/api/frontend/v1/Profil/isMitarbeiter/${uid}` + }; + }, + getZustellAdresse() { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Profil/getZustellAdresse' + }; + }, + getZustellKontakt() { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Profil/getZustellKontakt' + }; + }, + getGemeinden(nation, zip) { + return { + method: 'get', + url: `/api/frontend/v1/Profil/getGemeinden/${nation}/${zip}` + }; + + }, + getAllNationen() { + return { + method: 'get', + url: '/api/frontend/v1/Profil/getAllNationen' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/profilUpdate.js b/public/js/api/factory/profilUpdate.js new file mode 100644 index 000000000..42e87ae0e --- /dev/null +++ b/public/js/api/factory/profilUpdate.js @@ -0,0 +1,110 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + //! API calls for profil update requests + getStatus() { + return { + method: 'get', + url: '/api/frontend/v1/ProfilUpdate/getStatus' + }; + }, + getTopic() { + return { + method: 'get', + url: '/api/frontend/v1/ProfilUpdate/getTopic' + }; + }, + acceptProfilRequest({profil_update_id, uid, status_message, topic, requested_change}) { + return { + method: 'post', + url: '/api/frontend/v1/ProfilUpdate/acceptProfilRequest', + params: { + profil_update_id, + uid, + status_message, + topic, + requested_change + } + }; + }, + denyProfilRequest({profil_update_id, uid, topic, status_message}) { + return { + method: 'post', + url: '/api/frontend/v1/ProfilUpdate/denyProfilRequest', + params: { + profil_update_id, + uid, + topic, + status_message + } + }; + }, + insertFile(dms, replace = null) { + return { + method: 'post', + url: `/api/frontend/v1/ProfilUpdate/insertFile/${replace}`, + params: dms + }; + }, + getProfilRequestFiles(requestID) { + return { + method: 'get', + url: `/api/frontend/v1/ProfilUpdate/getProfilRequestFiles/${requestID}` + }; + }, + selectProfilRequest(uid = null, id = null) { + return { + method: 'get', + url: '/api/frontend/v1/ProfilUpdate/selectProfilRequest', + params: { + ...(uid ? { uid } : {}), + ...(id ? { id } : {}) + } + }; + }, + insertProfilRequest(topic, payload, fileID = null) { + return { + method: 'post', + url: '/api/frontend/v1/ProfilUpdate/insertProfilRequest', + params: { + topic, + payload, + ...(fileID ? { fileID } : {}) + } + }; + }, + updateProfilRequest(topic, payload, ID, fileID = null) { + return { + method: 'post', + url: '/api/frontend/v1/ProfilUpdate/updateProfilRequest', + params: { + topic, + payload, + ID, + ...(fileID ? { fileID } : {}) + } + }; + }, + deleteProfilRequest(requestID) { + return { + method: 'post', + url: '/api/frontend/v1/ProfilUpdate/deleteProfilRequest', + params: { requestID } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/searchbar.js b/public/js/api/factory/searchbar.js new file mode 100644 index 000000000..a7bd73b88 --- /dev/null +++ b/public/js/api/factory/searchbar.js @@ -0,0 +1,26 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + search(params) { + return { + method: 'post', + url: '/api/frontend/v1/searchbar/search', + params + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/studiengang.js b/public/js/api/factory/studiengang.js new file mode 100644 index 000000000..6d5ae15aa --- /dev/null +++ b/public/js/api/factory/studiengang.js @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + studiengangInformation() { + return { + method: 'get', + url: '/api/frontend/v1/Studgang/getStudiengangInfo' + }; + }, + getStudiengangByKz(studiengang_kz) { + return { + method: 'get', + url: '/api/frontend/v1/organisation/StudiengangEP/getStudiengangByKz', + params: { studiengang_kz } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/studstatus.js b/public/js/api/factory/studstatus.js new file mode 100644 index 000000000..459594f8d --- /dev/null +++ b/public/js/api/factory/studstatus.js @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import abmeldung from "./studstatus/abmeldung.js"; +import unterbrechung from "./studstatus/unterbrechung.js"; +import wiederholung from "./studstatus/wiederholung.js"; +import leitung from "./studstatus/leitung.js"; + +export default { + abmeldung, + unterbrechung, + wiederholung, + leitung +}; \ No newline at end of file diff --git a/public/js/api/factory/studstatus/abmeldung.js b/public/js/api/factory/studstatus/abmeldung.js new file mode 100644 index 000000000..81fe5fda7 --- /dev/null +++ b/public/js/api/factory/studstatus/abmeldung.js @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getDetails(antrag_id, prestudent_id) { + const url = '/api/frontend/v1/studstatus/abmeldung/' + + (antrag_id !== undefined ? 'getDetailsForAntrag/' + antrag_id : 'getDetailsForNewAntrag/' + prestudent_id); + return { + method: 'get', + url + }; + }, + create(studiensemester, prestudent_id, grund) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/abmeldung/createAntrag', + params: { + studiensemester, + prestudent_id, + grund + } + }; + }, + cancel(antrag_id) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/abmeldung/cancelAntrag', + params: { antrag_id } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/studstatus/leitung.js b/public/js/api/factory/studstatus/leitung.js new file mode 100644 index 000000000..cc6b87d25 --- /dev/null +++ b/public/js/api/factory/studstatus/leitung.js @@ -0,0 +1,100 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getStgs() { + return { + method: 'get', + url: '/api/frontend/v1/studstatus/leitung/getActiveStgs' + }; + }, + getAntraege(url, config, params) { + return { + method: 'get', + url: '/api/frontend/v1/studstatus/leitung/getAntraege/' + url + }; + }, + getHistory(antrag_id) { + return { + method: 'get', + url: '/api/frontend/v1/studstatus/leitung/getHistory/' + antrag_id + }; + }, + getPrestudents(query, signal) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/getPrestudents', + params: { query } + }; + }, + approve(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/approveAntrag', + params: antrag + }; + }, + reject(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/rejectAntrag', + params: antrag + }; + }, + reopen(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/reopenAntrag', + params: antrag + }; + }, + pause(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/pauseAntrag', + params: antrag + }; + }, + unpause(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/unpauseAntrag', + params: antrag + }; + }, + object(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/objectAntrag', + params: antrag + }; + }, + approveObjection(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/approveObjection', + params: antrag + }; + }, + denyObjection(antrag) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/leitung/denyObjection', + params: antrag + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/studstatus/unterbrechung.js b/public/js/api/factory/studstatus/unterbrechung.js new file mode 100644 index 000000000..bf772bf42 --- /dev/null +++ b/public/js/api/factory/studstatus/unterbrechung.js @@ -0,0 +1,49 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getDetails(antrag_id, prestudent_id) { + const url = '/api/frontend/v1/studstatus/unterbrechung/' + + (antrag_id !== undefined ? 'getDetailsForAntrag/' + antrag_id : 'getDetailsForNewAntrag/' + prestudent_id); + return { + method: 'get', + url + }; + }, + create(studiensemester, prestudent_id, grund, datum_wiedereinstieg, attachment) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/unterbrechung/createAntrag', + params: { + studiensemester, + prestudent_id, + grund, + datum_wiedereinstieg, + attachment + } + }; + }, + cancel(antrag_id) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/unterbrechung/cancelAntrag', + params: { + antrag_id + } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/studstatus/wiederholung.js b/public/js/api/factory/studstatus/wiederholung.js new file mode 100644 index 000000000..3591bb6ed --- /dev/null +++ b/public/js/api/factory/studstatus/wiederholung.js @@ -0,0 +1,63 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getDetails(prestudent_id) { + const url = '/api/frontend/v1/studstatus/wiederholung/getDetailsForNewAntrag/' + prestudent_id; + return { + method: 'get', + url + }; + }, + getLvs(antrag_id) { + const url = '/api/frontend/v1/studstatus/wiederholung/getLvs/' + antrag_id; + return { + method: 'get', + url + }; + }, + create(prestudent_id, studiensemester) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/wiederholung/createAntrag', + params: { + prestudent_id, + studiensemester + } + }; + }, + cancel(prestudent_id, studiensemester) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/wiederholung/cancelAntrag', + params: { + prestudent_id, + studiensemester + } + }; + }, + saveLvs(forbiddenLvs, mandatoryLvs) { + return { + method: 'post', + url: '/api/frontend/v1/studstatus/wiederholung/saveLvs', + params: { + forbiddenLvs, + mandatoryLvs + } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stundenplan.js b/public/js/api/factory/stundenplan.js new file mode 100644 index 000000000..3cfa3c641 --- /dev/null +++ b/public/js/api/factory/stundenplan.js @@ -0,0 +1,66 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getRoomInfo(ort_kurzbz, start_date, end_date) { + return { + method: 'get', + url: '/api/frontend/v1/Stundenplan/getRoomplan', + params: { ort_kurzbz, start_date, end_date } + }; + }, + getStundenplan(start_date, end_date, lv_id) { + return { + method: 'get', + url: '/api/frontend/v1/Stundenplan/getStundenplan', + params: { start_date, end_date, lv_id } + }; + }, + getStunden() { + // TODO(chris): seems to be called from nowhere? + return { + method: 'get', + url: '/api/frontend/v1/Stundenplan/Stunden' + }; + }, + getOrtReservierungen(ort_kurzbz, start_date, end_date) { + return { + method: 'get', + url: `/api/frontend/v1/Stundenplan/Reservierungen/${ort_kurzbz}`, + params: { start_date, end_date } + }; + }, + getStundenplanReservierungen(start_date, end_date) { + return { + method: 'get', + url: '/api/frontend/v1/Stundenplan/Reservierungen', + params: { start_date, end_date } + }; + }, + getLehreinheitStudiensemester(lehreinheit_id) { + return { + method: 'get', + url: `/api/frontend/v1/Stundenplan/getLehreinheitStudiensemester/${lehreinheit_id}` + }; + }, + studiensemesterDateInterval(date) { + return { + method: 'get', + url: `/api/frontend/v1/Stundenplan/studiensemesterDateInterval/${date}` + }; + }, +}; \ No newline at end of file diff --git a/public/js/api/factory/stv.js b/public/js/api/factory/stv.js new file mode 100644 index 000000000..7ea387263 --- /dev/null +++ b/public/js/api/factory/stv.js @@ -0,0 +1,48 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import app from './stv/app.js'; +import lists from './stv/lists.js'; +import verband from './stv/verband.js'; +import students from './stv/students.js'; +import filter from './stv/filter.js'; +import konto from './stv/konto.js'; +import kontakt from './stv/kontakt.js'; +import prestudent from './stv/prestudent.js'; +import status from './stv/status.js'; +import details from './stv/details.js'; +import exam from './stv/exam.js'; +import abschlusspruefung from './stv/abschlusspruefung.js'; +import grades from './stv/grades.js'; +import mobility from './stv/mobility.js'; + +export default { + app, + lists, + verband, + students, + filter, + konto, + kontakt, + prestudent, + status, + details, + exam, + abschlusspruefung, + grades, + mobility +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/abschlusspruefung.js b/public/js/api/factory/stv/abschlusspruefung.js new file mode 100644 index 000000000..37e442b19 --- /dev/null +++ b/public/js/api/factory/stv/abschlusspruefung.js @@ -0,0 +1,111 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getAbschlusspruefung(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getAbschlusspruefung/' + uid + }; + }, + addNewAbschlusspruefung(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/insertAbschlusspruefung/', + params + }; + }, + loadAbschlusspruefung(id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/loadAbschlusspruefung/', + params: { id } + }; + }, + updateAbschlusspruefung(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/updateAbschlusspruefung/', + params + }; + }, + deleteAbschlusspruefung(id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/deleteAbschlusspruefung/', + params: { id } + }; + }, + getTypenAbschlusspruefung() { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getTypenAbschlusspruefung/' + }; + }, + getTypenAntritte() { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getTypenAntritte/' + }; + }, + getBeurteilungen() { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getBeurteilungen/' + }; + }, + getAkadGrade(studiengang_kz) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/getAkadGrade/', + params: { studiengang_kz } + }; + }, + getTypStudiengang(studiengang_kz) { + // TODO(chris): seems to be called from nowhere? + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/getTypStudiengang/', + params: { studiengang_kz } + }; + }, + getMitarbeiter(searchString) { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getMitarbeiter/' + searchString + }; + }, + getPruefer(searchString) { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getPruefer/' + searchString + }; + }, + getNoten() { + return { + method: 'get', + url: 'api/frontend/v1/stv/abschlusspruefung/getNoten/' + }; + }, + checkForExistingExams(uids) { + return { + method: 'post', + url: 'api/frontend/v1/stv/abschlusspruefung/checkForExistingExams/', + params: { uid } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/app.js b/public/js/api/factory/stv/app.js new file mode 100644 index 000000000..6fcf46700 --- /dev/null +++ b/public/js/api/factory/stv/app.js @@ -0,0 +1,31 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + configStudent() { + return { + method: 'get', + url: 'api/frontend/v1/stv/config/student' + }; + }, + configStudents() { + return { + method: 'get', + url: 'api/frontend/v1/stv/config/students' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/details.js b/public/js/api/factory/stv/details.js new file mode 100644 index 000000000..282b0003e --- /dev/null +++ b/public/js/api/factory/stv/details.js @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(prestudent_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/student/get/' + prestudent_id + }; + }, + save(prestudent_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/student/save/' + prestudent_id, + params + }; + }, +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/exam.js b/public/js/api/factory/stv/exam.js new file mode 100644 index 000000000..0a03cf8f5 --- /dev/null +++ b/public/js/api/factory/stv/exam.js @@ -0,0 +1,101 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getPruefungen(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getPruefungen/' + uid + }; + }, + loadPruefung(pruefung_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/loadPruefung/' + pruefung_id + }; + }, + getTypenPruefungen() { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getTypenPruefungen' + }; + }, + getAllLehreinheiten(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/pruefung/getAllLehreinheiten/', + params + }; + }, + getLvsByStudent(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getLvsByStudent/' + uid + }; + }, + getLvsandLesByStudent(uid, semester) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getLvsandLesByStudent/' + uid + '/' + semester + }; + }, + getLvsAndMas(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getLvsAndMas/' + uid + }; + }, + getMitarbeiterLv(id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getMitarbeiterLv/' + id + }; + }, + getNoten() { + return { + method: 'get', + url: 'api/frontend/v1/stv/pruefung/getNoten' + }; + }, + checkZeugnisnoteLv(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/pruefung/checkZeugnisnoteLv/', + params + }; + }, + addPruefung(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/pruefung/insertPruefung/', + params + }; + }, + updatePruefung(id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/pruefung/updatePruefung/' + id, + params + }; + }, + deletePruefung(id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/pruefung/deletePruefung/' + id + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/filter.js b/public/js/api/factory/stv/filter.js new file mode 100644 index 000000000..b81121702 --- /dev/null +++ b/public/js/api/factory/stv/filter.js @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getStg() { + return { + method: 'get', + url: 'api/frontend/v1/stv/filter/getStg' + }; + }, + setStg(studiengang_kz) { + return { + method: 'post', + url: 'api/frontend/v1/stv/filter/setStg', + params: { studiengang_kz } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/grades.js b/public/js/api/factory/stv/grades.js new file mode 100644 index 000000000..ea0d025eb --- /dev/null +++ b/public/js/api/factory/stv/grades.js @@ -0,0 +1,96 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + list() { + return { + method: 'get', + url: 'api/frontend/v1/stv/grades/list' + }; + }, + getCertificate(prestudent_id, all) { + all = all ? '/all' : ''; + return { + method: 'get', + url: 'api/frontend/v1/stv/grades/getCertificate/' + prestudent_id + all + }; + }, + getTeacherProposal(prestudent_id, all) { + all = all ? '/all' : ''; + return { + method: 'get', + url: 'api/frontend/v1/stv/grades/getTeacherProposal/' + prestudent_id + all + }; + }, + getRepeaterGrades(prestudent_id, all) { + all = all ? '/all' : ''; + return { + method: 'get', + url: 'api/frontend/v1/stv/grades/getRepeaterGrades/' + prestudent_id + all + }; + }, + updateCertificate({lehrveranstaltung_id, student_uid, studiensemester_kurzbz, note, lehrveranstaltung_bezeichnung}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/grades/updateCertificate', + params: { + lehrveranstaltung_id, + student_uid, + studiensemester_kurzbz, + note + } + }; + }, + deleteCertificate({lehrveranstaltung_id, student_uid, studiensemester_kurzbz, lehrveranstaltung_bezeichnung}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/grades/deleteCertificate', + params: { + lehrveranstaltung_id, + student_uid, + studiensemester_kurzbz + } + }; + }, + copyTeacherProposalToCertificate({lehrveranstaltung_id, student_uid, studiensemester_kurzbz, lehrveranstaltung_bezeichnung}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/grades/copyTeacherProposalToCertificate', + params: { + lehrveranstaltung_id, + student_uid, + studiensemester_kurzbz + } + }; + }, + copyRepeaterGradeToCertificate({studierendenantrag_lehrveranstaltung_id, lv_bezeichnung}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/grades/copyRepeaterGradeToCertificate', + params: { + studierendenantrag_lehrveranstaltung_id + } + }; + }, + getGradeFromPoints(points, lehrveranstaltung_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/grades/getGradeFromPoints', + params: { points, lehrveranstaltung_id } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/kontakt.js b/public/js/api/factory/stv/kontakt.js new file mode 100644 index 000000000..ef77f6d6b --- /dev/null +++ b/public/js/api/factory/stv/kontakt.js @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +import address from './kontakt/address.js'; +import bankaccount from './kontakt/bankaccount.js'; +import contact from './kontakt/contact.js'; +import company from './kontakt/company.js'; + +export default { + address, + bankaccount, + contact, + company +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/kontakt/address.js b/public/js/api/factory/stv/kontakt/address.js new file mode 100644 index 000000000..78027835f --- /dev/null +++ b/public/js/api/factory/stv/kontakt/address.js @@ -0,0 +1,71 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getAdressen/' + uid + }; + }, + add(uid, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/addNewAddress/' + uid, + params + }; + }, + load(address_id){ + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/loadAddress/', + params: { address_id } + }; + }, + update(address_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/updateAddress/' + address_id, + params + }; + }, + delete(address_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/deleteAddress/', + params: { address_id } + }; + }, + getTypes() { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getAdressentypen/' + }; + }, + getPlaces(plz) { + return { + method: 'get', + url: 'api/frontend/v1/stv/address/getPlaces/' + plz + }; + }, + getNations() { + return { + method: 'get', + url: 'api/frontend/v1/stv/address/getNations/' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/kontakt/bankaccount.js b/public/js/api/factory/stv/kontakt/bankaccount.js new file mode 100644 index 000000000..7af230878 --- /dev/null +++ b/public/js/api/factory/stv/kontakt/bankaccount.js @@ -0,0 +1,53 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getBankverbindung/' + uid + }; + }, + add(uid, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/addNewBankverbindung/' + uid, + params + }; + }, + load(bankverbindung_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/loadBankverbindung/', + params: { bankverbindung_id } + }; + }, + update(bankverbindung_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/updateBankverbindung/' + bankverbindung_id, + params + }; + }, + delete(bankverbindung_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/deleteBankverbindung/', + params: { bankverbindung_id } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/kontakt/company.js b/public/js/api/factory/stv/kontakt/company.js new file mode 100644 index 000000000..e97a3de1e --- /dev/null +++ b/public/js/api/factory/stv/kontakt/company.js @@ -0,0 +1,25 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(searchString) { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getFirmen/' + searchString + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/kontakt/contact.js b/public/js/api/factory/stv/kontakt/contact.js new file mode 100644 index 000000000..7193a65c9 --- /dev/null +++ b/public/js/api/factory/stv/kontakt/contact.js @@ -0,0 +1,65 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getKontakte/' + uid + }; + }, + add(uid, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/addNewContact/' + uid, + params + }; + }, + load(kontakt_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/loadContact/', + params: { kontakt_id } + }; + }, + update(kontakt_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/updateContact/' + kontakt_id, + params + }; + }, + delete(kontakt_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/kontakt/deleteContact/', + params: { kontakt_id } + }; + }, + getTypes() { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getKontakttypen/' + }; + }, + getStandorteByFirma(searchString) { + return { + method: 'get', + url: 'api/frontend/v1/stv/kontakt/getStandorteByFirma/' + searchString + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/konto.js b/public/js/api/factory/stv/konto.js new file mode 100644 index 000000000..6c17d460d --- /dev/null +++ b/public/js/api/factory/stv/konto.js @@ -0,0 +1,74 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(person_id, only_open, studiengang_kz) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/get', + params: { + person_id, + only_open, + studiengang_kz + } + }; + }, + checkDoubles(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/checkDoubles', + params, + config: { + confirmErrorHandler: error => true + } + }; + }, + insert(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/insert', + params + }; + }, + counter(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/counter', + params + }; + }, + edit(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/update', + params + }; + }, + delete(buchungsnr) { + return { + method: 'post', + url: 'api/frontend/v1/stv/konto/delete', + params: { buchungsnr } + }; + }, + getBuchungstypen() { + return { + method: 'get', + url: 'api/frontend/v1/stv/konto/getBuchungstypen' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/lists.js b/public/js/api/factory/stv/lists.js new file mode 100644 index 000000000..4e7904d00 --- /dev/null +++ b/public/js/api/factory/stv/lists.js @@ -0,0 +1,55 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getSprachen() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getSprachen' + }; + }, + getGeschlechter() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getGeschlechter' + }; + }, + getAusbildungen() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getAusbildungen' + }; + }, + getStgs() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getStgs' + }; + }, + getOrgforms() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getOrgforms' + }; + }, + getStudiensemester() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getStudiensemester' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/mobility.js b/public/js/api/factory/stv/mobility.js new file mode 100644 index 000000000..262dbcf55 --- /dev/null +++ b/public/js/api/factory/stv/mobility.js @@ -0,0 +1,128 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getMobilitaeten(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getMobilitaeten/' + uid + }; + }, + getProgramsMobility() { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getProgramsMobility/' + }; + }, + addNewMobility(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/insertMobility/', + params + }; + }, + loadMobility(bisio_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/loadMobility/' + bisio_id + }; + }, + updateMobility(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/updateMobility/', + params + }; + }, + deleteMobility(bisio_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/deleteMobility/' + bisio_id + }; + }, + getLVList(studiengang_kz) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getLVList/' + studiengang_kz + }; + }, + getAllLehreinheiten(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/getAllLehreinheiten/', + params + }; + }, + getLvsandLesByStudent(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getLvsandLesByStudent/' + uid + }; + }, + getPurposes(bisio_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getPurposes/' + bisio_id + }; + }, + getSupports(bisio_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getSupports/' + bisio_id + }; + }, + getListPurposes() { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getListPurposes/' + }; + }, + getListSupports() { + return { + method: 'get', + url: 'api/frontend/v1/stv/mobility/getListSupports/' + }; + }, + deleteMobilityPurpose(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/deleteMobilityPurpose/' + params.bisio_id, + params + }; + }, + addMobilityPurpose(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/addMobilityPurpose/' + params.bisio_id, + params + }; + }, + deleteMobilitySupport(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/deleteMobilitySupport/' + params.bisio_id, + params + }; + }, + addMobilitySupport(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/mobility/addMobilitySupport/' + params.bisio_id, + params + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/prestudent.js b/public/js/api/factory/stv/prestudent.js new file mode 100644 index 000000000..a49dd1d7a --- /dev/null +++ b/public/js/api/factory/stv/prestudent.js @@ -0,0 +1,150 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + //------------- Prestudent.js------------------------------------------------------ + get(prestudent_id) { + return { + method: 'post', + url: 'api/frontend/v1/stv/prestudent/get/' + prestudent_id + }; + }, + updatePrestudent(prestudent_id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/prestudent/updatePrestudent/' + prestudent_id, + params + }; + }, + getBezeichnungZGV() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getBezeichnungZGV/' + }; + }, + getBezeichnungMZgv() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getBezeichnungMZgv/' + }; + }, + getBezeichnungDZgv() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getBezeichnungDZgv/' + }; + }, + getStgs() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getStgs/' + }; + }, + getAusbildung() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getAusbildung/' + }; + }, + getAufmerksamdurch() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getAufmerksamdurch/' + }; + }, + getBerufstaetigkeit() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getBerufstaetigkeit/' + }; + }, + getTypenStg() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getTypenStg/' + }; + }, + getBisstandort() { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getBisstandort/' + }; + }, + //------------- MultiStatus.js------------------------------------------------------ + getHistoryPrestudent(prestudent_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/status/getHistoryPrestudent/' + prestudent_id + }; + }, + getMaxSem(studiengang_kzs) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/getMaxSemester/', + params: { studiengang_kzs } + }; + }, + advanceStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/advanceStatus/' + + prestudent_id + '/' + + status_kurzbz + '/' + + studiensemester_kurzbz + '/' + + ausbildungssemester + }; + }, + confirmStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/confirmStatus/' + + prestudent_id + '/' + + status_kurzbz + '/' + + studiensemester_kurzbz + '/' + + ausbildungssemester + }; + }, + isLastStatus(id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/status/isLastStatus/' + id + }; + }, + deleteStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/deleteStatus/' + + prestudent_id + '/' + + status_kurzbz + '/' + + studiensemester_kurzbz + '/' + + ausbildungssemester + }; + }, + getLastBismeldestichtag() { + return { + method: 'get', + url: 'api/frontend/v1/stv/status/getLastBismeldestichtag/' + }; + }, + //------------- History.js------------------------------------------------------ + getHistoryPrestudents(person_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getHistoryPrestudents/' + person_id + }; + }, +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/status.js b/public/js/api/factory/stv/status.js new file mode 100644 index 000000000..11e7f4fde --- /dev/null +++ b/public/js/api/factory/stv/status.js @@ -0,0 +1,98 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + //------------- Modal.js------------------------------------------------------ + insertStatus(id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/insertStatus/' + id, + params + }; + }, + loadStatus({prestudent_id, status_kurzbz, studiensemester_kurzbz, ausbildungssemester}) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/loadStatus/' + + prestudent_id + '/' + + status_kurzbz + '/' + + studiensemester_kurzbz + '/' + + ausbildungssemester + }; + }, + updateStatus({ + prestudent_id, + status_kurzbz, + studiensemester_kurzbz, + ausbildungssemester + }, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/updateStatus/' + + prestudent_id + '/' + + status_kurzbz + '/' + + studiensemester_kurzbz + '/' + + ausbildungssemester, + params + }; + }, + getStudienplaene(prestudent_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getStudienplaene/' + prestudent_id + }; + }, + getStudiengang(prestudent_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/prestudent/getStudiengang/' + prestudent_id + }; + }, + getStatusgruende() { + return { + method: 'get', + url: 'api/frontend/v1/stv/status/getStatusgruende/' + }; + }, + getStati() { + return { + method: 'get', + url: 'api/frontend/v1/stv/lists/getStati/' + }; + }, + //------------- Dropdown.js------------------------------------------------------ + addStudent(id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/addStudent/' + id, + params + }; + }, + changeStatus(id, params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/status/changeStatus/' + id, + params + }; + }, + getStatusarray() { + return { + method: 'get', + url: 'api/frontend/v1/stv/status/getStatusarray/' + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/students.js b/public/js/api/factory/stv/students.js new file mode 100644 index 000000000..582ba04e8 --- /dev/null +++ b/public/js/api/factory/stv/students.js @@ -0,0 +1,50 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + uid(uid) { + return { + method: 'get', + url: 'api/frontend/v1/stv/students/uid/' + uid + }; + }, + prestudent(prestudent_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/students/prestudent/' + prestudent_id + }; + }, + person(person_id) { + return { + method: 'get', + url: 'api/frontend/v1/stv/students/person/' + person_id + }; + }, + verband(relative_path) { + return { + method: 'get', + url: 'api/frontend/v1/stv/students/' + relative_path + }; + }, + check(params) { + return { + method: 'post', + url: 'api/frontend/v1/stv/student/check', + params + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/stv/verband.js b/public/js/api/factory/stv/verband.js new file mode 100644 index 000000000..114931e4c --- /dev/null +++ b/public/js/api/factory/stv/verband.js @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + get(path) { + let url = 'api/frontend/v1/stv/verband'; + if (path) + url += '/' + path; + return { + method: 'get', + url + }; + }, + favorites: { + get() { + return { + method: 'get', + url: 'api/frontend/v1/stv/favorites' + }; + }, + set(favorites) { + return { + method: 'post', + url: 'api/frontend/v1/stv/favorites/set', + params: { favorites } + }; + } + } +}; \ No newline at end of file diff --git a/public/js/api/factory/widget/ampeln.js b/public/js/api/factory/widget/ampeln.js new file mode 100644 index 000000000..b634766a8 --- /dev/null +++ b/public/js/api/factory/widget/ampeln.js @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + open() { + return { + method: 'get', + url: '/api/frontend/v1/Ampeln/open' + }; + }, + all() { + return { + method: 'get', + url: '/api/frontend/v1/Ampeln/all' + }; + }, + confirm(ampel_id) { + return { + method: 'get', + url: `/api/frontend/v1/Ampeln/confirm/${ampel_id}` + }; + } +}; \ No newline at end of file diff --git a/public/js/api/factory/widget/bookmark.js b/public/js/api/factory/widget/bookmark.js new file mode 100644 index 000000000..9768e25ac --- /dev/null +++ b/public/js/api/factory/widget/bookmark.js @@ -0,0 +1,45 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + getBookmarks() { + return { + method: 'get', + url: '/api/frontend/v1/Bookmark/getBookmarks' + }; + }, + delete(bookmark_id) { + return { + method: 'get', + url: `/api/frontend/v1/Bookmark/delete/${bookmark_id}` + }; + }, + update({ bookmark_id, url, title, tag=null }) { + return { + method: 'post', + url: `/api/frontend/v1/Bookmark/update/${bookmark_id}`, + params: { url, title } + }; + }, + insert({ url, title, tag }) { + return { + method: 'post', + url: `/api/frontend/v1/Bookmark/insert`, + params: { url, title, tag } + }; + } +}; \ No newline at end of file diff --git a/public/js/api/udf.js b/public/js/api/udf.js new file mode 100644 index 000000000..77d1e92cb --- /dev/null +++ b/public/js/api/udf.js @@ -0,0 +1,26 @@ +/** + * Copyright (C) 2025 fhcomplete.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +export default { + load({ ciModel, pk }) { + return { + method: 'post', + url: '/api/frontend/v1/udf/load/' + ciModel, + params: pk + }; + } +}; \ No newline at end of file diff --git a/public/js/apps/Bismeldestichtag/Bismeldestichtag.js b/public/js/apps/Bismeldestichtag/Bismeldestichtag.js index 877805b8f..d6e5a4a27 100644 --- a/public/js/apps/Bismeldestichtag/Bismeldestichtag.js +++ b/public/js/apps/Bismeldestichtag/Bismeldestichtag.js @@ -23,7 +23,7 @@ import {CoreRESTClient} from '../../RESTClient.js'; import {CoreFetchCmpt} from '../../components/Fetch.js'; import {BismeldestichtagAPIs} from './API.js'; -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; const bismeldestichtagApp = Vue.createApp({ data: function() { @@ -237,4 +237,4 @@ const bismeldestichtagApp = Vue.createApp({ } }); -bismeldestichtagApp.use(Phrasen).mount('#main'); +bismeldestichtagApp.use(PluginsPhrasen).mount('#main'); diff --git a/public/js/apps/Cis.js b/public/js/apps/Cis.js index 482c2774a..b62592ebd 100644 --- a/public/js/apps/Cis.js +++ b/public/js/apps/Cis.js @@ -1,9 +1,7 @@ import FhcSearchbar from "../components/searchbar/searchbar.js"; import CisMenu from "../components/Cis/Menu.js"; -import FhcApi from '../plugin/FhcApi.js'; -import Phrasen from '../plugin/Phrasen.js'; -import fhcapifactory from "./api/fhcapifactory.js"; -Vue.$fhcapi = fhcapifactory; +import PluginsPhrasen from '../plugins/Phrasen.js'; +import ApiSearchbar from '../api/factory/searchbar.js'; const app = Vue.createApp({ name: 'CisApp', @@ -113,16 +111,15 @@ const app = Vue.createApp({ }, methods: { searchfunction: function(searchsettings) { - return Vue.$fhcapi.search.search(searchsettings); + return this.$api.call(ApiSearchbar.search(searchsettings)); } } }); -app.use(FhcApi); app.use(primevue.config.default, { zIndex: { overlay: 9000, tooltip: 8000 } }) -app.use(Phrasen); +app.use(PluginsPhrasen); app.mount('#cis-header'); diff --git a/public/js/apps/Cis/Documents.js b/public/js/apps/Cis/Documents.js index bcb01b6e8..de03769b4 100644 --- a/public/js/apps/Cis/Documents.js +++ b/public/js/apps/Cis/Documents.js @@ -1,4 +1,4 @@ -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; import {setScrollbarWidth} from "../../helpers/CssVarCalcHelpers.js"; const app = Vue.createApp({ @@ -89,5 +89,5 @@ const app = Vue.createApp({ setScrollbarWidth(); -app.use(Phrasen); +app.use(PluginsPhrasen); app.mount('#content'); diff --git a/public/js/apps/Cis/ProfilUpdateRequests.js b/public/js/apps/Cis/ProfilUpdateRequests.js index 05ce939e4..68465b202 100644 --- a/public/js/apps/Cis/ProfilUpdateRequests.js +++ b/public/js/apps/Cis/ProfilUpdateRequests.js @@ -1,6 +1,7 @@ import ProfilUpdateView from "../../components/Cis/ProfilUpdate/ProfilUpdateView.js"; -import Phrasen from "../../plugin/Phrasen.js"; +import PluginsPhrasen from "../../plugins/Phrasen.js"; +import ApiProfilUpdate from '../../api/factory/profilUpdate.js'; // TODO: sobald in verwendung den vue router pfad zu ProfilUpdateView definieren und diese app in component auslagern const app = Vue.createApp({ @@ -23,7 +24,8 @@ const app = Vue.createApp({ }, methods: {}, created() { - this.$fhcApi.factory.profilUpdate.getStatus() + this.$api + .call(ApiProfilUpdate.getStatus()) .then((response) => { this.profilUpdateStates = response.data; }) @@ -32,4 +34,4 @@ const app = Vue.createApp({ }); }, }); -app.use(Phrasen).mount("#content"); \ No newline at end of file +app.use(PluginsPhrasen).mount("#content"); \ No newline at end of file diff --git a/public/js/apps/Dashboard/Admin.js b/public/js/apps/Dashboard/Admin.js index 0470f82a7..4a5fcee2f 100644 --- a/public/js/apps/Dashboard/Admin.js +++ b/public/js/apps/Dashboard/Admin.js @@ -1,7 +1,6 @@ import {CoreNavigationCmpt} from '../../components/navigation/Navigation.js'; import DashboardAdmin from '../../components/Dashboard/Admin.js'; -import FhcApi from '../../plugin/FhcApi.js'; -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; const app = Vue.createApp({ name: 'AdminApp', @@ -13,6 +12,5 @@ const app = Vue.createApp({ DashboardAdmin } }); -app.use(FhcApi); -app.use(Phrasen); +app.use(PluginsPhrasen); app.mount('#main'); \ No newline at end of file diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index ea8d512df..3b6bb5683 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -1,6 +1,5 @@ import FhcDashboard from '../../components/Dashboard/Dashboard.js'; -import FhcApi from '../../plugin/FhcApi.js'; -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; import contrast from '../../directives/contrast.js'; import {setScrollbarWidth} from "../../helpers/CssVarCalcHelpers.js"; import Stundenplan, {DEFAULT_MODE_STUNDENPLAN} from "../../components/Cis/Stundenplan/Stundenplan.js"; @@ -259,13 +258,12 @@ const app = Vue.createApp({ // kind of a bandaid for bad css on some pages to avoid horizontal scroll setScrollbarWidth(); app.use(router); -app.use(FhcApi); app.use(primevue.config.default, { zIndex: { overlay: 9000, tooltip: 8000 } }) -app.use(Phrasen); +app.use(PluginsPhrasen); app.directive('contrast', contrast); app.mount('#fhccontent'); \ No newline at end of file diff --git a/public/js/apps/LogsViewer/LogsViewer.js b/public/js/apps/LogsViewer/LogsViewer.js index 8aefa1d67..eeb4b38a7 100644 --- a/public/js/apps/LogsViewer/LogsViewer.js +++ b/public/js/apps/LogsViewer/LogsViewer.js @@ -21,7 +21,7 @@ import {LogsViewerTabulatorEventHandlers} from './TabulatorSetup.js'; import {CoreFilterCmpt} from '../../components/filter/Filter.js'; import {CoreNavigationCmpt} from '../../components/navigation/Navigation.js'; -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; const logsViewerApp = Vue.createApp({ data: function() { @@ -42,5 +42,5 @@ const logsViewerApp = Vue.createApp({ } }); -logsViewerApp.use(Phrasen).mount('#main'); +logsViewerApp.use(PluginsPhrasen).mount('#main'); diff --git a/public/js/apps/Studentenverwaltung.js b/public/js/apps/Studentenverwaltung.js index fbbee8e1d..bef605a10 100644 --- a/public/js/apps/Studentenverwaltung.js +++ b/public/js/apps/Studentenverwaltung.js @@ -18,7 +18,7 @@ import FhcStudentenverwaltung from "../components/Stv/Studentenverwaltung.js"; import fhcapifactory from "./api/fhcapifactory.js"; -import Phrasen from "../plugin/Phrasen.js"; +import PluginsPhrasen from "../plugins/Phrasen.js"; const ciPath = FHC_JS_DATA_STORAGE_OBJECT.app_root.replace(/(https:|)(^|\/\/)(.*?\/)/g, '') + FHC_JS_DATA_STORAGE_OBJECT.ci_router; @@ -34,7 +34,9 @@ const router = VueRouter.createRouter({ ] }); -const app = Vue.createApp(); +const app = Vue.createApp({ + name: 'StudentenverwaltungApp' +}); app .use(router) @@ -43,5 +45,5 @@ app overlay: 1100 } }) - .use(Phrasen) + .use(PluginsPhrasen) .mount('#main'); diff --git a/public/js/apps/lehre/Antrag.js b/public/js/apps/lehre/Antrag.js index bb7de3485..97b4bda97 100644 --- a/public/js/apps/lehre/Antrag.js +++ b/public/js/apps/lehre/Antrag.js @@ -1,7 +1,7 @@ import StudierendenantragAntrag from "../../components/Studierendenantrag/Antrag.js"; import StudierendenantragStatus from "../../components/Studierendenantrag/Status.js"; import StudierendenantragInfoblock from "../../components/Studierendenantrag/Infoblock.js"; -import Phrasen from '../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../plugins/Phrasen.js'; const app = Vue.createApp({ name: 'AntragApp', @@ -21,5 +21,5 @@ const app = Vue.createApp({ } }); app - .use(Phrasen) + .use(PluginsPhrasen) .mount('#wrapper'); \ No newline at end of file diff --git a/public/js/apps/lehre/Antrag/Leitung.js b/public/js/apps/lehre/Antrag/Leitung.js index 22c3fa3f5..8fd8b117e 100644 --- a/public/js/apps/lehre/Antrag/Leitung.js +++ b/public/js/apps/lehre/Antrag/Leitung.js @@ -1,5 +1,5 @@ import StudierendenantragLeitung from '../../../components/Studierendenantrag/Leitung.js'; -import Phrasen from '../../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../../plugins/Phrasen.js'; const app = Vue.createApp({ name: 'LeitungApp', @@ -8,6 +8,6 @@ const app = Vue.createApp({ } }); app - .use(Phrasen) + .use(PluginsPhrasen) .use(primevue.config.default,{zIndex: {overlay: 9999}}) .mount('#wrapper'); \ No newline at end of file diff --git a/public/js/apps/lehre/Antrag/Lvzuweisung.js b/public/js/apps/lehre/Antrag/Lvzuweisung.js index ecad05fa5..7504e7dcf 100644 --- a/public/js/apps/lehre/Antrag/Lvzuweisung.js +++ b/public/js/apps/lehre/Antrag/Lvzuweisung.js @@ -1,5 +1,5 @@ import LvZuweisung from '../../../components/Studierendenantrag/Lvzuweisung.js'; -import Phrasen from '../../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../../plugins/Phrasen.js'; const app = Vue.createApp({ name: 'LvzuweisungApp', @@ -13,5 +13,5 @@ const app = Vue.createApp({ } }); app - .use(Phrasen) + .use(PluginsPhrasen) .mount('#wrapper'); \ No newline at end of file diff --git a/public/js/apps/lehre/Antrag/Student.js b/public/js/apps/lehre/Antrag/Student.js index 1848daea4..46150c541 100644 --- a/public/js/apps/lehre/Antrag/Student.js +++ b/public/js/apps/lehre/Antrag/Student.js @@ -1,5 +1,5 @@ import LvPopup from '../../../components/Studierendenantrag/Leitung/LvPopup.js'; -import Phrasen from '../../../plugin/Phrasen.js'; +import PluginsPhrasen from '../../../plugins/Phrasen.js'; const app = Vue.createApp({ name: 'StudentApp', @@ -8,5 +8,5 @@ const app = Vue.createApp({ } }); app - .use(Phrasen) + .use(PluginsPhrasen) .mount('#wrapper'); \ No newline at end of file diff --git a/public/js/apps/lehre/lvplanung/LvTemplates.js b/public/js/apps/lehre/lvplanung/LvTemplates.js index 5bb8694a0..655d611ce 100644 --- a/public/js/apps/lehre/lvplanung/LvTemplates.js +++ b/public/js/apps/lehre/lvplanung/LvTemplates.js @@ -17,9 +17,7 @@ import LvTemplateUebersicht from '../../../lehre/lvplanung/LvTemplateUebersicht.js'; import {CoreNavigationCmpt} from '../../../components/navigation/Navigation.js'; -import FhcAlert from '../../../plugin/FhcAlert.js'; -import FhcApi from "../../../plugin/FhcApi.js"; -import Phrasen from "../../../plugin/Phrasen.js"; +import PluginsPhrasen from "../../../plugins/Phrasen.js"; const lvTemplatesApp = Vue.createApp({ @@ -32,7 +30,5 @@ const lvTemplatesApp = Vue.createApp({ lvTemplatesApp .use(primevue.config.default,{zIndex: {overlay: 9999}}) - .use(FhcAlert) - .use(FhcApi) - .use(Phrasen) + .use(PluginsPhrasen) .mount('#main') \ No newline at end of file diff --git a/public/js/components/Betriebsmittel/Betriebsmittel.js b/public/js/components/Betriebsmittel/Betriebsmittel.js index d1c07db33..39681ffb4 100644 --- a/public/js/components/Betriebsmittel/Betriebsmittel.js +++ b/public/js/components/Betriebsmittel/Betriebsmittel.js @@ -35,13 +35,9 @@ export default { return { tabulatorOptions: { ajaxURL: 'dummy', - ajaxRequestFunc: this.endpoint.getAllBetriebsmittel, - ajaxParams: () => { - return { - type: this.typeId, - id: this.id - }; - }, + ajaxRequestFunc: () => this.$api.call( + this.endpoint.getAllBetriebsmittel(this.typeId, this.id) + ), ajaxResponse: (url, params, response) => response.data, columns: [ {title: "Nummer", field: "nummer", width: 150}, @@ -221,7 +217,9 @@ export default { .then(result => result ? betriebsmittelperson_id : Promise.reject({handled: true})) - .then(this.endpoint.deleteBetriebsmittel) + .then(betriebsmittelperson_id => this.$api.call( + this.endpoint.deleteBetriebsmittel(betriebsmittelperson_id)) + ) .then(result => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); window.scrollTo(0, 0); @@ -234,8 +232,8 @@ export default { this.formData.uid = this.uid; if (this.formData.betriebsmitteltyp == 'Inventar') this.formData.betriebsmittel_id = this.formData.inventarData?.betriebsmittel_id; - return this.endpoint - .addNewBetriebsmittel(this.$refs.betriebsmittelData, this.id, this.formData) + return this.$refs.betriebsmittelData + .call(this.endpoint.addNewBetriebsmittel(this.id, this.formData)) .then(response => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); this.$refs.betriebsmittelModal.hide(); @@ -248,8 +246,11 @@ export default { updateBetriebsmittel(betriebsmittelperson_id) { if (this.formData.betriebsmitteltyp == 'Inventar') this.formData.betriebsmittel_id = this.formData.inventarData?.betriebsmittel_id; - return this.endpoint - .updateBetriebsmittel(this.$refs.betriebsmittelData, betriebsmittelperson_id, this.formData) + return this.$refs.betriebsmittelData + .call(this.endpoint.updateBetriebsmittel( + betriebsmittelperson_id, + this.formData + )) .then(response => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); this.$refs.betriebsmittelModal.hide(); @@ -262,8 +263,8 @@ export default { loadBetriebsmittel(betriebsmittelperson_id) { this.resetModal(); this.statusNew = false; - return this.endpoint - .loadBetriebsmittel(betriebsmittelperson_id) + return this.$api + .call(this.endpoint.loadBetriebsmittel(betriebsmittelperson_id)) .then(result => { this.formData = result.data; }) @@ -271,8 +272,8 @@ export default { }, searchInventar(event) { const encodedQuery = encodeURIComponent(event.query); - return this.endpoint - .loadInventarliste(encodedQuery) + return this.$api + .call(this.endpoint.loadInventarliste(encodedQuery)) .then(result => { this.filteredInventar = result.data; }); @@ -294,8 +295,8 @@ export default { } }, created() { - return this.endpoint - .getTypenBetriebsmittel() + return this.$api + .call(this.endpoint.getTypenBetriebsmittel()) .then(result => { this.listBetriebsmitteltyp = result.data; }) diff --git a/public/js/components/Bootstrap/Alert.js b/public/js/components/Bootstrap/Alert.js index 075c9cf86..9afcfe475 100644 --- a/public/js/components/Bootstrap/Alert.js +++ b/public/js/components/Bootstrap/Alert.js @@ -1,6 +1,7 @@ import BsModal from './Modal.js'; export default { + name: 'BootstrapAlert', components: { BsModal }, diff --git a/public/js/components/Bootstrap/Confirm.js b/public/js/components/Bootstrap/Confirm.js index 7a6f74b15..a56885473 100644 --- a/public/js/components/Bootstrap/Confirm.js +++ b/public/js/components/Bootstrap/Confirm.js @@ -1,6 +1,7 @@ import BsAlert from './Alert.js'; export default { + name: 'BootstrapConfirm', mixins: [ BsAlert ], diff --git a/public/js/components/Bootstrap/Modal.js b/public/js/components/Bootstrap/Modal.js index e390319e8..e08bf7526 100644 --- a/public/js/components/Bootstrap/Modal.js +++ b/public/js/components/Bootstrap/Modal.js @@ -1,6 +1,7 @@ -import Phrasen from '../../plugin/Phrasen.js'; +//import Phrasen from '../../plugin/Phrasen.js'; export default { + name: 'BootstrapModal', data: () => ({ modal: null }), @@ -77,6 +78,7 @@ export default { return new Promise((resolve,reject) => { const instance = Vue.createApp({ + name: 'ModalTmpApp', setup() { return () => Vue.h(BsModal, {...{ class: 'fade' @@ -104,9 +106,12 @@ export default { instance.use(primevue.config.default, {zIndex: {overlay: 9999}}) } - instance.use(Phrasen); // TODO(chris): find a more dynamic way - instance.mount(wrapper); - document.body.appendChild(wrapper); + //instance.use(Phrasen); // TODO(chris): find a more dynamic way + import('../../plugins/Phrasen.js').then((Phrasen) => { + instance.use(Phrasen.default); + instance.mount(wrapper); + document.body.appendChild(wrapper); + }); }); }, template: `
-