mirror of
https://github.com/espocrm/espocrm.git
synced 2026-06-28 06:56:05 +00:00
Tasks panel support assigned users
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{{#if value}}
|
||||
{{~#if value~}}
|
||||
{{{value}}}
|
||||
{{/if}}
|
||||
{{~/if~}}
|
||||
|
||||
@@ -2460,6 +2460,11 @@ div:has(.icon-in-input) {
|
||||
|
||||
color: var(--gray-soft);
|
||||
}
|
||||
|
||||
> .link-multiple-item {
|
||||
display: inline;
|
||||
padding-right: var(--10px);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user