Tasks panel support assigned users

This commit is contained in:
Yurii
2026-04-08 10:05:44 +03:00
parent 02eb715962
commit a432ca9303
3 changed files with 33 additions and 2 deletions

View File

@@ -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',

View File

@@ -1,3 +1,3 @@
{{#if value}}
{{~#if value~}}
{{{value}}}
{{/if}}
{{~/if~}}

View File

@@ -2460,6 +2460,11 @@ div:has(.icon-in-input) {
color: var(--gray-soft);
}
> .link-multiple-item {
display: inline;
padding-right: var(--10px);
}
}
}