EspoCRM – Open Source CRM Application
PHP calendarcontactscrmcrm-platformcrm-systemcustomer-portalcustomer-supportcustomizabledocumentsemail-marketingkanbanleadsopen-sourcephpplatformsales-automationsingle-page-applicationsupport
ref
Yuri Kuznetsova13710e9d23a
diff --git a/client/src/views/email/fields/create-event.js b/client/src/views/email/fields/create-event.jsindex 0818131b96..bd574ebfed 100644--- a/client/src/views/email/fields/create-event.js+++ b/client/src/views/email/fields/create-event.js@@ -27,6 +27,7 @@************************************************************************/import BaseFieldView from 'views/fields/base';+import RecordModal from 'helpers/record-modal';export default class extends BaseFieldView {@@ -48,9 +49,6 @@ export default class extends BaseFieldView {}createEvent() {- const viewName = this.getMetadata().get(['clientDefs', this.eventEntityType, 'modalViews', 'edit']) ||- 'views/modals/edit';-const eventData = this.model.get('icsEventData') || {};const attributes = Espo.Utils.cloneDeep(eventData.valueMap || {});@@ -61,21 +59,17 @@ export default class extends BaseFieldView {this.addFromAddressToAttributes(attributes);- this.createView('dialog', viewName, {+ const helper = new RecordModal();++ helper.showCreate(this, {+ entityType: this.eventEntityType,attributes: attributes,- scope: this.eventEntityType,- })- .then(view => {- view.render();-- this.listenToOnce(view, 'after:save', () => {- this.model- .fetch()- .then(() =>- Espo.Ui.success(this.translate('Done'))- );- });- });+ afterSave: async () => {+ await this.model.fetch();++ Espo.Ui.success(this.translate('Done'))+ },+ });}/**