Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Replace setter function with normal fn to account for side effects

Kabiru Mwenja89884dcc658f
diff --git a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
index 04393a525be..f2942396a47 100644
--- a/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
+++ b/frontend/src/stimulus/controllers/dynamic/work-packages/activities-tab/index.controller.ts
@@ -651,7 +651,7 @@ export default class IndexController extends Controller {
async onSubmit(event:Event | null = null) {
if (this.saveInProgress === true) return;
- this.formSubmitInProgress = true;
+ this.setFormSubmitInProgress(true);
event?.preventDefault();
@@ -664,11 +664,11 @@ export default class IndexController extends Controller {
console.error('Error saving activity:', error);
})
.finally(() => {
- this.formSubmitInProgress = false;
+ this.setFormSubmitInProgress(false);
});
}
- private set formSubmitInProgress(inProgress:boolean) {
+ private setFormSubmitInProgress(inProgress:boolean) {
this.saveInProgress = inProgress;
if (this.hasFormSubmitButtonTarget) {
@@ -722,7 +722,7 @@ export default class IndexController extends Controller {
this.handleStemVisibility();
}, 10);
- this.formSubmitInProgress = false;
+ this.setFormSubmitInProgress(false);
}
private resetJournalsContainerMargins():void {