diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index 375e8b0499..4894867f1b 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -125,10 +125,7 @@ define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (D this.allDayScopeList = this.getMetadata() .get('clientDefs.Calendar.allDayScopeList') || this.allDayScopeList; - this.colors = _.extend( - this.colors, - Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}), - ); + this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')}; this.scopeFilter = false; diff --git a/client/modules/crm/src/views/calendar/modals/edit.js b/client/modules/crm/src/views/calendar/modals/edit.js index 545b9608bd..2021157437 100644 --- a/client/modules/crm/src/views/calendar/modals/edit.js +++ b/client/modules/crm/src/views/calendar/modals/edit.js @@ -56,9 +56,9 @@ define('crm:views/calendar/modals/edit', ['views/modals/edit'], function (Dep) { this.getModelFactory().create(this.scope, model => { model.populateDefaults(); - var attributes = this.getRecordView().fetch(); + let attributes = this.getRecordView().fetch(); - attributes = _.extend(attributes, this.getRecordView().model.getClonedAttributes()); + attributes = {...attributes, ...this.getRecordView().model.getClonedAttributes()}; this.filterAttributesForEntityType(attributes, scope); diff --git a/client/modules/crm/src/views/calendar/timeline.js b/client/modules/crm/src/views/calendar/timeline.js index 2616cfe499..f5b893c03e 100644 --- a/client/modules/crm/src/views/calendar/timeline.js +++ b/client/modules/crm/src/views/calendar/timeline.js @@ -139,10 +139,7 @@ define('crm:views/calendar/timeline', ['view', 'lib!vis'], function (Dep, Vis) { this.allDayScopeList = this.getMetadata() .get('clientDefs.Calendar.allDayScopeList') || this.allDayScopeList || []; - this.colors = _.extend( - this.colors, - Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}), - ); + this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')}; this.isCustomViewAvailable = this.getAcl().get('userPermission') !== 'no'; diff --git a/client/modules/crm/src/views/scheduler/scheduler.js b/client/modules/crm/src/views/scheduler/scheduler.js index 11c785988f..58dbf207ab 100644 --- a/client/modules/crm/src/views/scheduler/scheduler.js +++ b/client/modules/crm/src/views/scheduler/scheduler.js @@ -48,13 +48,9 @@ define('crm:views/scheduler/scheduler', ['view', 'lib!vis'], function (Dep, Vis) this.endField = this.options.endField || 'dateEnd'; this.assignedUserField = this.options.assignedUserField || 'assignedUser'; - this.colors = Espo.Utils.clone( - this.getMetadata().get('clientDefs.Calendar.colors') || {}); + this.colors = Espo.Utils.clone(this.getMetadata().get('clientDefs.Calendar.colors') || {}); - this.colors = _.extend( - this.colors, - Espo.Utils.clone(this.getHelper().themeManager.getParam('calendarColors') || {}), - ); + this.colors = {...this.colors, ...this.getHelper().themeManager.getParam('calendarColors')}; let usersFieldDefault = 'users'; diff --git a/client/src/controllers/admin.js b/client/src/controllers/admin.js index c733a6d5d0..fe17c9520b 100644 --- a/client/src/controllers/admin.js +++ b/client/src/controllers/admin.js @@ -44,10 +44,10 @@ class AdminController extends Controller { let page = options.page; if (options.options) { - options = _.extend( - Espo.Utils.parseUrlOptionsParam(options.options), - options - ); + options = { + ...Espo.Utils.parseUrlOptionsParam(options.options), + ...options, + }; delete options.options; } diff --git a/client/src/views/list.js b/client/src/views/list.js index 97a4f4793c..8a1d2ce605 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -727,10 +727,11 @@ class ListView extends MainView { this.prepareCreateReturnDispatchParams(returnDispatchParams); - _.extend(options, { + options = { + ...options, returnUrl: this.getRouter().getCurrentUrl(), returnDispatchParams: returnDispatchParams, - }); + }; return this.createView('quickCreate', viewName, options, (view) => { view.render(); @@ -773,10 +774,11 @@ class ListView extends MainView { this.prepareCreateReturnDispatchParams(returnDispatchParams); - _.extend(options, { + options = { + ...options, returnUrl: this.getRouter().getCurrentUrl(), - returnDispatchParams: returnDispatchParams - }); + returnDispatchParams: returnDispatchParams, + }; router.navigate(url, {trigger: false}); router.dispatch(this.scope, 'create', options); diff --git a/client/src/views/modals/edit.js b/client/src/views/modals/edit.js index 10f828b21d..998cc80d3f 100644 --- a/client/src/views/modals/edit.js +++ b/client/src/views/modals/edit.js @@ -352,7 +352,7 @@ class EditModalView extends ModalView { attributes = this.getRecordView().fetch(); model = this.getRecordView().model; - attributes = _.extend(attributes, model.getClonedAttributes()); + attributes = {...attributes, ...model.getClonedAttributes()}; options = { attributes: attributes, @@ -376,7 +376,7 @@ class EditModalView extends ModalView { attributes = this.getRecordView().fetch(); model = this.getRecordView().model; - attributes = _.extend(attributes, model.getClonedAttributes()); + attributes = {...attributes, ...model.getClonedAttributes()}; options = { attributes: attributes, diff --git a/client/src/views/record/base.js b/client/src/views/record/base.js index 20e2f020b0..5d2c8b6b49 100644 --- a/client/src/views/record/base.js +++ b/client/src/views/record/base.js @@ -1200,7 +1200,7 @@ class BaseRecordView extends View { } if (!view.disabled && !view.readOnly && view.isFullyRendered()) { - _.extend(data, view.fetch()); + data = {...data, ...view.fetch()}; } }