mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
numeric notensort in all tables; changed stv projektarbeit getNoten to only fetch active ones so stv and abgabetool use the same set of grades;
This commit is contained in:
@@ -287,10 +287,7 @@ class Projektarbeit extends FHCAPI_Controller
|
||||
*/
|
||||
public function getNoten()
|
||||
{
|
||||
$this->NoteModel->addOrder('notenwert', 'ASC');
|
||||
$this->NoteModel->addOrder('bezeichnung', 'ASC');
|
||||
|
||||
$result = $this->NoteModel->load();
|
||||
$result = $this->NoteModel->getAllActive();
|
||||
|
||||
if (isError($result)) return $this->terminateWithError(getError($result), self::ERROR_TYPE_GENERAL);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ export const AbgabetoolAssistenz = {
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4orgformv2'))), field: 'orgform', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 50, visible: false},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4projekttyp'))), field: 'projekttyp_kurzbz', formatter: this.centeredTextFormatter, minWidth: 150, visible: false},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4stg'))), field: 'stg', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 50, visible: false},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4note'))), field: 'note_bez', headerFilter: true, visible: false, minWidth: 200, formatter: this.centeredTextFormatter},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4note'))), field: 'note_bez', headerFilter: true, sorter: this.notenSorter, visible: false, minWidth: 200, formatter: this.centeredTextFormatter},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4sem'))), field: 'studiensemester_kurzbz', headerFilter: true, visible: false, formatter: this.centeredTextFormatter, minWidth: 100},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4titel'))), field: 'titel', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 100, visible: false},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4erstbetreuerv2'))), field: 'erstbetreuer', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 100, visible: false},
|
||||
@@ -433,6 +433,7 @@ export const AbgabetoolAssistenz = {
|
||||
if (!val) return '';
|
||||
return val?.bezeichnung ?? this.notenOptions?.find(n => n.note == val)?.bezeichnung ?? val;
|
||||
},
|
||||
sorter: this.notenSorterFlat,
|
||||
minWidth: 100,
|
||||
tooltip: false,
|
||||
headerFilter: this.notenHeaderFilterEditor,
|
||||
@@ -521,6 +522,18 @@ export const AbgabetoolAssistenz = {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
notenSorterFlat(a, b, aRow, bRow, column, dir, sorterParams) {
|
||||
// flat table has their own sort since the field is called sligthly different in that context
|
||||
// since note would be bestanden/nicht bestanden and that hardly needs sorting
|
||||
const aData = aRow.getData()
|
||||
const bData = bRow.getData()
|
||||
return aData.pa_note - bData.pa_note
|
||||
},
|
||||
notenSorter(a, b, aRow, bRow, column, dir, sorterParams) {
|
||||
const aData = aRow.getData()
|
||||
const bData = bRow.getData()
|
||||
return aData.note - bData.note
|
||||
},
|
||||
notenHeaderFilterEditor(cell, onRendered, success, cancel, editorParams) {
|
||||
if (!this.notenOptions) return;
|
||||
|
||||
@@ -1785,7 +1798,8 @@ export const AbgabetoolAssistenz = {
|
||||
if(this.notenOptions && projekt.note) {
|
||||
const opt = this.notenOptions.find(n => n.note == projekt.note)
|
||||
|
||||
// TODO: mehrsprachig englisch
|
||||
// TODO: mehrsprachig englisch -> nevermind the english field in
|
||||
// notenoption->bezeichnung_mehrsprachig is ALWAYS german
|
||||
projekt.note_bez = opt.bezeichnung
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4orgformv2'))), field: 'orgform', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 50, visible: false},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4projekttyp'))), field: 'projekttyp_kurzbz', formatter: this.centeredTextFormatter, minWidth: 100,visible: true},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4stg'))), field: 'stg', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 50, visible: true},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4note'))), field: 'note_bez', headerFilter: true, visible: false, minWidth: 200, formatter: this.centeredTextFormatter},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4note'))), field: 'note_bez', headerFilter: true, visible: false, sorter: this.notenSorter, minWidth: 200, formatter: this.centeredTextFormatter},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4sem'))), field: 'studiensemester_kurzbz', headerFilter: true, formatter: this.centeredTextFormatter, visible: true, minWidth: 100},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4titel'))), field: 'titel', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 100, width: 500, visible: true},
|
||||
{title: Vue.computed(() => this.$capitalize(this.$p.t('abgabetool/c4erstbetreuerv2'))), field: 'betreuer_full_name', headerFilter: true, formatter: this.centeredTextFormatter, minWidth: 100, visible: false},
|
||||
@@ -264,6 +264,11 @@ export const AbgabetoolMitarbeiter = {
|
||||
]};
|
||||
},
|
||||
methods: {
|
||||
notenSorter(a, b, aRow, bRow, column, dir, sorterParams) {
|
||||
const aData = aRow.getData()
|
||||
const bData = bRow.getData()
|
||||
return aData.note - bData.note
|
||||
},
|
||||
async openBenotung(type, link) {
|
||||
if(type === 'new') {
|
||||
window.open(link, '_blank')
|
||||
@@ -1209,14 +1214,19 @@ export const AbgabetoolMitarbeiter = {
|
||||
return (projekt.typ + projekt.kurzbz)?.toUpperCase()
|
||||
},
|
||||
setupData(data){
|
||||
|
||||
|
||||
this.domain = data[1]
|
||||
|
||||
this.projektarbeiten = data[0]?.retval?.map(projekt => {
|
||||
this.checkAbgabetermineProjektarbeit(projekt)
|
||||
projekt.selectable = projekt.betreuerart_kurzbz !== 'Zweitbegutachter'
|
||||
|
||||
if(this.notenOptions && projekt.note) {
|
||||
const opt = this.notenOptions.find(n => n.note == projekt.note)
|
||||
// TODO: mehrsprachig englisch -> nevermind the english field in
|
||||
// notenoption->bezeichnung_mehrsprachig is ALWAYS german
|
||||
projekt.note_bez = opt?.bezeichnung
|
||||
}
|
||||
|
||||
return {
|
||||
...projekt,
|
||||
details: {
|
||||
|
||||
Reference in New Issue
Block a user