mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 00:54:27 +00:00
adjust abgabetool queries lehreinheit -> lehrveranstaltung table; always redraw with scrollX/Y preserve in abgabetool
This commit is contained in:
@@ -247,9 +247,23 @@ export const AbgabetoolAssistenz = {
|
||||
]};
|
||||
},
|
||||
methods: {
|
||||
redrawTableScrollSave() {
|
||||
const table = this.$refs.abgabeTable.tabulator;
|
||||
const scrollX = table.rowManager.scrollLeft;
|
||||
const scrollY = table.rowManager.scrollTop;
|
||||
this.$refs.abgabeTable.tabulator.redraw(true)
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
const tableholder = this.$refs.abgabeTable?.tabulator.element.querySelector('.tabulator-tableholder')
|
||||
if(tableholder) {
|
||||
tableholder.scrollLeft = scrollX;
|
||||
tableholder.scrollTop = scrollY;
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePaUpdated(projektarbeit) {
|
||||
this.checkAbgabetermineProjektarbeit(projektarbeit)
|
||||
this.$refs.abgabeTable.tabulator.redraw(true)
|
||||
this.redrawTableScrollSave()
|
||||
},
|
||||
getQGateStatusList() {
|
||||
return [
|
||||
@@ -736,24 +750,9 @@ export const AbgabetoolAssistenz = {
|
||||
pa.abgabetermine.sort((a, b) => new Date(a.datum) - new Date(b.datum))
|
||||
})
|
||||
|
||||
// reset selection to empty
|
||||
// this.$refs.abgabeTable.tabulator.deselectRow()
|
||||
const table = this.$refs.abgabeTable.tabulator;
|
||||
const scrollX = table.rowManager.scrollLeft;
|
||||
const scrollY = table.rowManager.scrollTop;
|
||||
|
||||
const mappedData = this.mapProjekteToTableData(this.projektarbeiten)
|
||||
this.projektarbeiten = this.mapProjekteToTableData(this.projektarbeiten)
|
||||
|
||||
table.setData(mappedData)
|
||||
table.redraw(true)
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
const table = this.$refs.abgabeTable?.tabulator.element.querySelector('.tabulator-tableholder')
|
||||
if(table) {
|
||||
table.scrollLeft = scrollX;
|
||||
table.scrollTop = scrollY;
|
||||
}
|
||||
})
|
||||
this.redrawTableScrollSave()
|
||||
|
||||
}).finally(()=>{
|
||||
this.saving = false
|
||||
@@ -977,14 +976,13 @@ export const AbgabetoolAssistenz = {
|
||||
return projekt.zweitbetreuer_full_name ?? ''
|
||||
},
|
||||
async setupData(data){
|
||||
this.projektarbeiten = data[0]
|
||||
this.domain = data[1]
|
||||
|
||||
this.tableData = this.mapProjekteToTableData(this.projektarbeiten)
|
||||
|
||||
this.projektarbeiten = this.mapProjekteToTableData(data[0])
|
||||
|
||||
await this.tableBuiltPromise
|
||||
|
||||
this.$refs.abgabeTable.tabulator.setData(this.tableData);
|
||||
this.$refs.abgabeTable.tabulator.setData(this.projektarbeiten);
|
||||
},
|
||||
loadProjektarbeiten(all = false, callback) {
|
||||
this.loading = true
|
||||
|
||||
@@ -43,7 +43,6 @@ export const AbgabetoolMitarbeiter = {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tableData: null,
|
||||
abgabetypenBetreuer: null,
|
||||
detailIsFullscreen: false,
|
||||
phrasenPromise: null,
|
||||
@@ -205,9 +204,23 @@ export const AbgabetoolMitarbeiter = {
|
||||
]};
|
||||
},
|
||||
methods: {
|
||||
redrawTableScrollSave() {
|
||||
const table = this.$refs.abgabeTable.tabulator;
|
||||
const scrollX = table.rowManager.scrollLeft;
|
||||
const scrollY = table.rowManager.scrollTop;
|
||||
this.$refs.abgabeTable.tabulator.redraw(true)
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
const tableholder = this.$refs.abgabeTable?.tabulator.element.querySelector('.tabulator-tableholder')
|
||||
if(tableholder) {
|
||||
tableholder.scrollLeft = scrollX;
|
||||
tableholder.scrollTop = scrollY;
|
||||
}
|
||||
})
|
||||
},
|
||||
handlePaUpdated(projektarbeit) {
|
||||
this.checkAbgabetermineProjektarbeit(projektarbeit)
|
||||
this.$refs.abgabeTable.tabulator.redraw(true)
|
||||
this.redrawTableScrollSave()
|
||||
},
|
||||
sammelMailStudent(param) {
|
||||
|
||||
@@ -601,8 +614,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
this.showAll = showall
|
||||
this.loading = true
|
||||
this.loadProjektarbeiten(showall, () => {
|
||||
this.$refs.abgabeTable?.tabulator.redraw(true)
|
||||
this.$refs.abgabeTable?.tabulator.setSort([]);
|
||||
this.redrawTableScrollSave()
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
@@ -627,8 +639,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
const oldScrollTop = this.$refs.abgabeTable?.tabulator.rowManager.scrollTop
|
||||
this.loading = true
|
||||
this.loadProjektarbeiten(this.showAll, () => {
|
||||
this.$refs.abgabeTable?.tabulator.redraw(true)
|
||||
this.$refs.abgabeTable?.tabulator.setSort([]);
|
||||
this.redrawTableScrollSave()
|
||||
this.loading = false
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
@@ -762,11 +773,9 @@ export const AbgabetoolMitarbeiter = {
|
||||
},
|
||||
setupData(data){
|
||||
|
||||
|
||||
this.projektarbeiten = data[0]
|
||||
this.domain = data[1]
|
||||
|
||||
this.tableData = data[0]?.retval?.map(projekt => {
|
||||
|
||||
this.projektarbeiten = data[0]?.retval?.map(projekt => {
|
||||
this.checkAbgabetermineProjektarbeit(projekt)
|
||||
projekt.selectable = projekt.betreuerart_kurzbz !== 'Zweitbegutachter'
|
||||
|
||||
@@ -787,7 +796,7 @@ export const AbgabetoolMitarbeiter = {
|
||||
})
|
||||
|
||||
this.$refs.abgabeTable.tabulator.setColumns(this.abgabeTableOptions.columns)
|
||||
this.$refs.abgabeTable.tabulator.setData(this.tableData);
|
||||
this.$refs.abgabeTable.tabulator.setData(this.projektarbeiten);
|
||||
},
|
||||
loadProjektarbeiten(all = false, callback) {
|
||||
this.$api.call(ApiAbgabe.getMitarbeiterProjektarbeiten(all))
|
||||
|
||||
Reference in New Issue
Block a user