From 204046620c48d44fa6695e3d72001eae8a450b72 Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Wed, 3 Aug 2022 12:46:56 +0300 Subject: [PATCH] cs fix --- .../crm/src/views/record/panels/activities.js | 31 +++++-------------- 1 file changed, 8 insertions(+), 23 deletions(-) diff --git a/client/modules/crm/src/views/record/panels/activities.js b/client/modules/crm/src/views/record/panels/activities.js index 8aad29977e..036a160a2a 100644 --- a/client/modules/crm/src/views/record/panels/activities.js +++ b/client/modules/crm/src/views/record/panels/activities.js @@ -80,23 +80,8 @@ define('crm:views/record/panels/activities', this.setupActionList(); this.setupFinalActionList(); - this.setupSorting(); - let actionList = []; - - this.actionList.forEach(o => { - if (o.aclScope) { - if (this.getMetadata().get(['scopes', o.aclScope, 'disabled'])) { - return; - } - } - - actionList.push(o); - }); - - this.actionList = actionList; - this.scopeList.forEach(item => { if (!(item in this.listLayout)) { this.listLayout[item] = this.defaultListLayout; @@ -197,7 +182,7 @@ define('crm:views/record/panels/activities', let o = { action: 'createActivity', - html: this.translate((this.name === 'history' ?'Log' : 'Schedule') + ' ' + scope, 'labels', scope), + html: this.translate((this.name === 'history' ? 'Log' : 'Schedule') + ' ' + scope, 'labels', scope), data: {}, acl: 'create', aclScope: scope, @@ -347,7 +332,7 @@ define('crm:views/record/panels/activities', status: data.status, }; - if (this.model.name == 'User') { + if (this.model.name === 'User') { if (this.model.isPortal()) { attributes.usersIds = [this.model.id]; @@ -361,9 +346,9 @@ define('crm:views/record/panels/activities', } } else { - if (this.model.name == 'Contact') { + if (this.model.name === 'Contact') { if (this.model.get('accountId') && !this.getConfig().get('b2cMode')) { - attributes.parentType = 'Account', + attributes.parentType = 'Account'; attributes.parentId = this.model.get('accountId'); attributes.parentName = this.model.get('accountName'); if ( @@ -377,13 +362,13 @@ define('crm:views/record/panels/activities', } } } - else if (this.model.name == 'Lead') { - attributes.parentType = 'Lead', + else if (this.model.name === 'Lead') { + attributes.parentType = 'Lead'; attributes.parentId = this.model.id; attributes.parentName = this.model.get('name'); } - if (this.model.name != 'Account' && this.model.has('contactsIds')) { + if (this.model.name !== 'Account' && this.model.has('contactsIds')) { attributes.contactsIds = this.model.get('contactsIds'); attributes.contactsNames = this.model.get('contactsNames'); } @@ -632,6 +617,6 @@ define('crm:views/record/panels/activities', data.viewOptions.massUnlinkDisabled = true; Dep.prototype.actionViewRelatedList.call(this, data); - } + }, }); });