Skip to content

EspoCRM – Open Source CRM Application

ref

Yuri Kuznetsov5dfab7e3258e
diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js
index 6f77059c59..e47f7e833d 100644
--- a/client/src/views/record/list.js
+++ b/client/src/views/record/list.js
@@ -3214,7 +3214,7 @@ class ListRecordView extends View {
* @protected
* @param {{id?: string, scope?: string}} [data]
*/
- actionQuickView(data) {
+ async actionQuickView(data) {
data = data || {};
const id = data.id;
@@ -3253,27 +3253,20 @@ class ListRecordView extends View {
return;
}
- const helper = new RecordModal();
-
- helper
- .showDetail(this, {
- id: id,
- scope: scope,
- model: model,
- rootUrl: this.options.keepCurrentRootUrl ? this.getRouter().getCurrentUrl() : null,
- editDisabled: this.quickEditDisabled,
- })
- .then(view => {
- if (!model) {
- return;
- }
+ const view = await (new RecordModal()).showDetail(this, {
+ id: id,
+ scope: scope,
+ model: model,
+ rootUrl: this.options.keepCurrentRootUrl ? this.getRouter().getCurrentUrl() : null,
+ editDisabled: this.quickEditDisabled,
+ })
- this.listenTo(view, 'after:save', model => {
- this.trigger('after:save', model);
- });
+ if (!model) {
+ return;
+ }
- this.listenTo(view, 'after:destroy', model => this.removeRecordFromList(model.id));
- });
+ this.listenTo(view, 'after:save', model => this.trigger('after:save', model));
+ this.listenTo(view, 'after:destroy', model => this.removeRecordFromList(model.id));
}
// noinspection JSUnusedGlobalSymbols