diff --git a/public/js/api/factory/detailHeader.js b/public/js/api/factory/detailHeader.js new file mode 100644 index 000000000..f9f368bc7 --- /dev/null +++ b/public/js/api/factory/detailHeader.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 { + getHeader(person_id){ + return { + method: 'get', + url: 'api/frontend/v1/vertraege/vertraege/getHeader/' + person_id, + }; + }, + getPersonAbteilung(person_id){ + return { + method: 'get', + url: 'api/frontend/v1/vertraege/vertraege/getPersonAbteilung/' + person_id, + }; + }, + getLeitungOrg(oekurzbz){ + return { + method: 'get', + url: 'api/frontend/v1/vertraege/vertraege/getLeitungOrg/' + oekurzbz, + }; + }, +} \ No newline at end of file diff --git a/public/js/api/factory/vertraege/vertraege.js b/public/js/api/factory/vertraege/vertraege.js index c442bd8c3..714856cfe 100644 --- a/public/js/api/factory/vertraege/vertraege.js +++ b/public/js/api/factory/vertraege/vertraege.js @@ -132,24 +132,6 @@ export default { url: 'api/frontend/v1/vertraege/vertraege/getMitarbeiter/', }; }, - getHeader(person_id){ - return { - method: 'get', - url: 'api/frontend/v1/vertraege/vertraege/getHeader/' + person_id, - }; - }, - getPersonAbteilung(person_id){ - return { - method: 'get', - url: 'api/frontend/v1/vertraege/vertraege/getPersonAbteilung/' + person_id, - }; - }, - getLeitungOrg(oekurzbz){ - return { - method: 'get', - url: 'api/frontend/v1/vertraege/vertraege/getLeitungOrg/' + oekurzbz, - }; - }, getMitarbeiterUid(person_id){ return { method: 'get', diff --git a/public/js/components/DetailHeader/DetailHeader.js b/public/js/components/DetailHeader/DetailHeader.js index 6f40c0972..0b50c5153 100644 --- a/public/js/components/DetailHeader/DetailHeader.js +++ b/public/js/components/DetailHeader/DetailHeader.js @@ -1,4 +1,4 @@ -import ApiCoreVertraege from "../../api/factory/vertraege/vertraege.js"; +import ApiDetailHeader from "../../api/factory/detailHeader.js"; export default { name: 'DetailHeader', @@ -76,7 +76,7 @@ export default { methods: { getHeader(person_id) { return this.$api - .call(ApiCoreVertraege.getHeader(person_id)) + .call(ApiDetailHeader.getHeader(person_id)) .then(result => { this.headerDataMa = result.data; @@ -85,7 +85,7 @@ export default { }, loadDepartmentData(person_id) { return this.$api - .call(ApiCoreVertraege.getPersonAbteilung(person_id)) + .call(ApiDetailHeader.getPersonAbteilung(person_id)) .then(result => { this.departmentData = result.data; }) @@ -93,7 +93,7 @@ export default { }, getLeitungOrg(oekurzbz){ return this.$api - .call(ApiCoreVertraege.getLeitungOrg(oekurzbz)) + .call(ApiDetailHeader.getLeitungOrg(oekurzbz)) .then(result => { this.leitungData = result.data; })