diff --git a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php index 411851e98..ad62702d8 100644 --- a/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php +++ b/application/controllers/api/frontend/v1/education/PaabgabeUebersicht.php @@ -14,6 +14,8 @@ if (!defined('BASEPATH')) exit('No direct script access allowed'); +use CI3_Events as Events; + class PaabgabeUebersicht extends FHCAPI_Controller { const DOWNLOAD_PERMISSION = 'lehre/abgabetool:download'; @@ -59,6 +61,12 @@ class PaabgabeUebersicht extends FHCAPI_Controller if (isError($result)) $this->terminateWithError(getError($result), self::ERROR_TYPE_DB); + // check wether Abgabe is in visual library + if (hasData($result)) + { + Events::trigger('in_visual_library', getData($result)); + } + $this->terminateWithSuccess(getData($result) ?: []); } diff --git a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js index 6e73e97da..68821a231 100644 --- a/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js +++ b/public/js/components/Cis/ProjektabgabeUebersicht/ProjektabgabeUebersicht.js @@ -65,9 +65,9 @@ export const ProjektabgabeUebersicht = { let editButton = document.createElement('button'); editButton.className = 'btn btn-outline-secondary'; editButton.innerHTML = ''; - editButton.addEventListener('click', () => - this.$refs.edit.open(cell.getData()) - ); + //editButton.addEventListener('click', () => + //this.$refs.edit.open(cell.getData()) + //); container.append(editButton); } @@ -75,6 +75,7 @@ export const ProjektabgabeUebersicht = { } }, {title: Vue.computed(() => this.$p.t('abgabetool/paabgabeid')), field: 'paabgabe_id', widthGrow: 1, visible: false}, + {title: Vue.computed(() => this.$p.t('abgabetool/projektarbeitid')), field: 'projektarbeit_id', widthGrow: 1, visible: false}, { title: Vue.computed(() => this.$p.t('abgabetool/termin')), field: "termin", @@ -98,7 +99,15 @@ export const ProjektabgabeUebersicht = { {title: Vue.computed(() => this.$p.t('person/nachname')), field: 'nachname', widthGrow: 1}, {title: Vue.computed(() => this.$p.t('abgabetool/typ')), field: 'projekttyp_kurzbz', widthGrow: 1}, {title: Vue.computed(() => this.$p.t('abgabetool/titel')), field: 'titel', widthGrow: 1}, - {title: Vue.computed(() => this.$p.t('abgabetool/status')), field: 'status', widthGrow: 1} + {title: Vue.computed(() => this.$p.t('abgabetool/status')), field: 'status', widthGrow: 2}, + { + title: Vue.computed(() => this.$p.t('abgabetool/inVisualLibrary')), + field: 'in_visual_library', + widthGrow: 1, + formatter: (cell) => { + return cell.getValue() ? this.$p.t('ui/ja') : this.$p.t('ui/nein'); + } + } ], persistence: false, }, @@ -206,7 +215,6 @@ export const ProjektabgabeUebersicht = { if (this.selectedAbgabetyp) url.searchParams.append('abgabetyp_kurzbz', this.selectedAbgabetyp); if (this.selectedTermin) url.searchParams.append('abgabedatum', this.selectedTermin); if (this.personSearchString) url.searchParams.append('personSearchString', this.personSearchString); - console.log(url.toString()); window.open(url.toString(), '_blank'); } },