From dac371b48117eb464c3c551cf3b0c822640c2358 Mon Sep 17 00:00:00 2001 From: Jan Date: Sat, 18 Oct 2025 10:13:05 +0200 Subject: [PATCH] Bugfix: Reset pagination position on delete (my calculations) --- src/frontend/src/pages/Calculations.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/frontend/src/pages/Calculations.vue b/src/frontend/src/pages/Calculations.vue index 437db84..f2e7c53 100644 --- a/src/frontend/src/pages/Calculations.vue +++ b/src/frontend/src/pages/Calculations.vue @@ -197,7 +197,7 @@ export default { if (0 === this.selectedStatus.draft.length) { this.modal.title = "Edit calculations"; - this.modal.message = `All of the ${this.premiseStore.selectedIds.length} selected calculations are already completed or archived and can no longer be edited. Would you like to create new drafts based on the data from the existing calculations, or continue the operation without these calculations?`; + this.modal.message = `All of the ${this.premiseStore.selectedIds.length} selected calculations are already completed or archived and can no longer be edited. Would you like to create new drafts based on the data from the existing calculations?`; this.modal.action = "edit"; this.modal.state = true; this.modal.acceptText = "Create new drafts & edit"; @@ -241,8 +241,10 @@ export default { this.updateOverallCheckBox(); } }, - updatePagination() { + updatePagination(resetPage = true) { this.pagination = this.premiseStore.pagination; + if(resetPage) + this.pagination.page = 1; }, updateCheckbox(data) { this.premiseStore.setChecked(data.id, data.checked); @@ -283,7 +285,7 @@ export default { async executeSearch() { await this.premiseStore.setQuery(this.query); - this.updatePagination(); + this.updatePagination(false); this.updateOverallCheckBox(); } }