diff --git a/application/config/Events.php b/application/config/Events.php new file mode 100644 index 000000000..191a1eb98 --- /dev/null +++ b/application/config/Events.php @@ -0,0 +1,14 @@ + 'TEST', + 'component' => './Stv/Studentenverwaltung/Details/Notizen.js' + ]; + }); + */ diff --git a/application/controllers/components/stv/Config.php b/application/controllers/components/stv/Config.php new file mode 100644 index 000000000..a9503f4e6 --- /dev/null +++ b/application/controllers/components/stv/Config.php @@ -0,0 +1,40 @@ + 'Details', + 'component' => './Stv/Studentenverwaltung/Details/Details.js' + ]; + $result['kontakt'] = [ + 'title' => 'Kontakt', + 'component' => './Stv/Studentenverwaltung/Details/Kontakt.js' + ]; + $result['notizen'] = [ + 'title' => 'Notizen', + 'component' => './Stv/Studentenverwaltung/Details/Notizen.js' + ]; + + Events::trigger('stv_conf_student', $result); + + $this->outputJsonSuccess($result); + } + + public function students() + { + $this->outputJsonSuccess([]); + } +} diff --git a/application/core/CI3_Events.php b/application/core/CI3_Events.php new file mode 100644 index 000000000..d2c687a75 --- /dev/null +++ b/application/core/CI3_Events.php @@ -0,0 +1,51 @@ + diff --git a/public/js/components/Stv/Studentenverwaltung/Details.js b/public/js/components/Stv/Studentenverwaltung/Details.js index f444c0eec..78e57ae88 100644 --- a/public/js/components/Stv/Studentenverwaltung/Details.js +++ b/public/js/components/Stv/Studentenverwaltung/Details.js @@ -1,66 +1,20 @@ -import accessibility from "../../../directives/accessibility.js"; +import FhcTabs from "../../Tabs.js"; export default { - directives: { - accessibility + components: { + FhcTabs }, props: { - student: Object - }, - data() { - return { - current: this.$route.params.tab || 'details', - tabTemplates: { - details: 'Details', - notizen: 'Notizen', - kontakt: 'Kontakt' - }, - tabs: {} - } - }, - computed: { - hasNoStudent() { - return !this.student || (Object.keys(this.student).length === 0 && this.student.constructor === Object); - }, - currentComponent() { - return this.tabs[this.current].component; - } - }, - created() { - this.tabs = Object.fromEntries(Object.entries(this.tabTemplates).map(([key, title]) => { - return [key, { - title, - component: Vue.defineAsyncComponent(() => import("./Details/" + key.charAt(0).toUpperCase() + key.slice(1) + '.js')) - }]; - })); + students: Array }, template: `
-
Bitte StudentIn auswählen!
-