mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
betreuer page update table after adding serientermin qgate1/2 status prev/next; preserve scrollX/Y in betreuer/assistenz page
This commit is contained in:
@@ -643,21 +643,21 @@ export const AbgabetoolAssistenz = {
|
||||
// reset selection to empty
|
||||
// this.$refs.abgabeTable.tabulator.deselectRow()
|
||||
const table = this.$refs.abgabeTable.tabulator;
|
||||
const scrollX = table.rowManager.element.scrollLeft;
|
||||
const scrollY = table.rowManager.element.scrollTop;
|
||||
const scrollX = table.rowManager.scrollLeft;
|
||||
const scrollY = table.rowManager.scrollTop;
|
||||
|
||||
const mappedData = this.mapProjekteToTableData(this.projektarbeiten)
|
||||
|
||||
table.setData(mappedData)
|
||||
table.redraw(true)
|
||||
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
table.rowManager.element.scrollLeft = scrollX;
|
||||
table.rowManager.element.scrollTop = scrollY;
|
||||
});
|
||||
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
const table = this.$refs.abgabeTable?.tabulator.element.querySelector('.tabulator-tableholder')
|
||||
if(table) {
|
||||
table.scrollLeft = scrollX;
|
||||
table.scrollTop = scrollY;
|
||||
}
|
||||
})
|
||||
|
||||
}).finally(()=>{
|
||||
this.saving = false
|
||||
|
||||
@@ -563,6 +563,24 @@ export const AbgabetoolMitarbeiter = {
|
||||
)).then(res => {
|
||||
if (res.meta.status === "success" && res.data) {
|
||||
this.$fhcAlert.alertSuccess(this.$p.t('abgabetool/serienTerminGespeichert'))
|
||||
|
||||
const oldScrollLeft = this.$refs.abgabeTable?.tabulator.rowManager.scrollLeft
|
||||
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.loading = false
|
||||
|
||||
Vue.nextTick(()=> {
|
||||
const table = this.$refs.abgabeTable?.tabulator.element.querySelector('.tabulator-tableholder')
|
||||
if(table) {
|
||||
table.scrollLeft = oldScrollLeft;
|
||||
table.scrollTop = oldScrollTop;
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
} else {
|
||||
this.$fhcAlert.alertError(this.$p.t('abgabetool/errorSerienterminSpeichern'))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user