Skip to content

EspoCRM – Open Source CRM Application

Calendar update after task complete

Yurii41e160c8d2d9
diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
index 86da441f15..2bcfedeb16 100644
--- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
+++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json
@@ -8,9 +8,6 @@
"list": "crm:views/task/list",
"detail": "crm:views/task/detail"
},
- "modalViews": {
- "detail": "crm:views/task/modals/detail"
- },
"viewSetupHandlers": {
"record/detail": [
"__APPEND__",
@@ -41,7 +38,7 @@
"name": "complete",
"label": "Complete",
"acl": "edit",
- "handler": "crm:handlers/task/detail-actions",
+ "handler": "modules/crm/handlers/task/detail-actions",
"actionFunction": "complete",
"checkVisibilityFunction": "isCompleteAvailable"
}
diff --git a/client/modules/crm/src/handlers/task/detail-actions.js b/client/modules/crm/src/handlers/task/detail-actions.js
index 2856c8055a..4be81cd98a 100644
--- a/client/modules/crm/src/handlers/task/detail-actions.js
+++ b/client/modules/crm/src/handlers/task/detail-actions.js
@@ -38,6 +38,10 @@ class DetailActions extends ActionHandler {
.then(() => {
Espo.Ui.success(this.view.getLanguage().translateOption('Completed', 'status', 'Task'));
});
+
+
+ // Needed for calendar update.
+ this.view.trigger('after:save', model);
}
// noinspection JSUnusedGlobalSymbols
diff --git a/client/modules/crm/src/views/meeting/modals/detail.js b/client/modules/crm/src/views/meeting/modals/detail.js
index 252d45adbf..003d0f22e6 100644
--- a/client/modules/crm/src/views/meeting/modals/detail.js
+++ b/client/modules/crm/src/views/meeting/modals/detail.js
@@ -303,12 +303,14 @@ class MeetingModalDetailView extends DetailModalView {
actionSetHeld() {
this.model.save({status: 'Held'});
+ // Needed for calendar update.
this.trigger('after:save', this.model);
}
actionSetNotHeld() {
this.model.save({status: 'Not Held'});
+ // Needed for calendar update.
this.trigger('after:save', this.model);
}
diff --git a/client/modules/crm/src/views/task/modals/detail.js b/client/modules/crm/src/views/task/modals/detail.js
deleted file mode 100644
index f348a55586..0000000000
--- a/client/modules/crm/src/views/task/modals/detail.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/************************************************************************
- * This file is part of EspoCRM.
- *
- * EspoCRM – Open Source CRM application.
- * Copyright (C) 2014-2026 EspoCRM, Inc.
- * Website: https://www.espocrm.com
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <https://www.gnu.org/licenses/>.
- *
- * The interactive user interfaces in modified source and object code versions
- * of this program must display Appropriate Legal Notices, as required under
- * Section 5 of the GNU Affero General Public License version 3.
- *
- * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
- * these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
- ************************************************************************/
-
-define('crm:views/task/modals/detail', ['views/modals/detail'], function (Dep) {
-
- return Dep.extend({});
-});