From 16ce6eb0b94e7b59dc030b4447df359de832b397 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Thu, 8 Aug 2024 17:06:22 +0300 Subject: [PATCH] ref --- client/src/views/extension/record/list.js | 20 +++---- .../src/views/extension/record/row-actions.js | 59 +++++++++---------- 2 files changed, 37 insertions(+), 42 deletions(-) diff --git a/client/src/views/extension/record/list.js b/client/src/views/extension/record/list.js index 2a52be61f0..9e79a749fc 100644 --- a/client/src/views/extension/record/list.js +++ b/client/src/views/extension/record/list.js @@ -26,18 +26,14 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/extension/record/list', ['views/record/list'], function (Dep) { +import ListRecordView from 'views/record/list'; - return Dep.extend({ +export default class extends ListRecordView { - rowActionsView: 'views/extension/record/row-actions', + rowActionsView = 'views/extension/record/row-actions' - checkboxes: false, - - quickDetailDisabled: true, - - quickEditDisabled: true, - - massActionList: [], - }); -}); + checkboxes = false + quickDetailDisabled = true + quickEditDisabled = true + massActionList = [] +} diff --git a/client/src/views/extension/record/row-actions.js b/client/src/views/extension/record/row-actions.js index b45a7a9f38..f555675e8f 100644 --- a/client/src/views/extension/record/row-actions.js +++ b/client/src/views/extension/record/row-actions.js @@ -26,43 +26,42 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/extension/record/row-actions', ['views/record/row-actions/default'], function (Dep) { +import DefaultRowActionsView from 'views/record/row-actions/default'; - return Dep.extend({ +export default class extends DefaultRowActionsView { - getActionList: function () { - if (!this.options.acl.edit) { - return []; - } - - if (this.model.get('isInstalled')) { - return [ - { - action: 'uninstall', - label: 'Uninstall', - data: { - id: this.model.id, - }, - }, - ]; - } + getActionList() { + if (!this.options.acl.edit) { + return []; + } + if (this.model.get('isInstalled')) { return [ { - action: 'install', - label: 'Install', - data: { - id: this.model.id, - }, - }, - { - action: 'quickRemove', - label: 'Remove', + action: 'uninstall', + label: 'Uninstall', data: { id: this.model.id, }, }, ]; - }, - }); -}); + } + + return [ + { + action: 'install', + label: 'Install', + data: { + id: this.model.id, + }, + }, + { + action: 'quickRemove', + label: 'Remove', + data: { + id: this.model.id, + }, + }, + ]; + } +}