Skip to content

EspoCRM – Open Source CRM Application

Tasks panel support assigned users

Yuriia432ca9303d7
diff --git a/client/modules/crm/src/views/record/panels/tasks.js b/client/modules/crm/src/views/record/panels/tasks.js
index c1ac53ffac..29720edd7e 100644
--- a/client/modules/crm/src/views/record/panels/tasks.js
+++ b/client/modules/crm/src/views/record/panels/tasks.js
@@ -93,6 +93,7 @@ export default class TasksRelationshipPanelView extends RelationshipPanelView {
this.url = this.model.entityType + '/' + this.model.id + '/' + this.link;
+ this.setupListLayout();
this.setupSorting();
if (this.filterList && this.filterList.length) {
@@ -132,6 +133,31 @@ export default class TasksRelationshipPanelView extends RelationshipPanelView {
this.listenTo(this.model, events, () => this.collection.fetch());
}
+ /**
+ * @private
+ */
+ setupListLayout() {
+ if (!this.getMetadata().get(`scopes.Task.assignedUsers`)) {
+ return;
+ }
+
+ this.listLayout = Espo.Utils.cloneDeep(this.listLayout);
+
+ for (const row of this.listLayout.rows) {
+ const index = row.findIndex(row => row.name === 'assignedUser');
+
+ if (index !== -1) {
+ row.splice(index, 1);
+ }
+ }
+
+ this.listLayout.rows.push([
+ {
+ name: 'assignedUsers',
+ }
+ ]);
+ }
+
afterRender() {
this.createView('list', 'views/record/list-expanded', {
selector: '> .list-container',
diff --git a/client/res/templates/fields/link-multiple/list.tpl b/client/res/templates/fields/link-multiple/list.tpl
index 992758f0fe..8ffbac37e8 100644
--- a/client/res/templates/fields/link-multiple/list.tpl
+++ b/client/res/templates/fields/link-multiple/list.tpl
@@ -1,3 +1,3 @@
-{{#if value}}
+{{~#if value~}}
{{{value}}}
-{{/if}}
+{{~/if~}}
diff --git a/frontend/less/espo/custom.less b/frontend/less/espo/custom.less
index 926103c4d2..fc7c2c76f8 100644
--- a/frontend/less/espo/custom.less
+++ b/frontend/less/espo/custom.less
@@ -2460,6 +2460,11 @@ div:has(.icon-in-input) {
color: var(--gray-soft);
}
+
+ > .link-multiple-item {
+ display: inline;
+ padding-right: var(--10px);
+ }
}
}