Show organisation name on CRM view if exists

This commit is contained in:
Hadi Nategh 2020-10-30 10:32:18 +01:00
parent ac64ae51aa
commit b26bcf2978
2 changed files with 4 additions and 2 deletions

View File

@ -206,7 +206,8 @@ var AddressbookApp = /** @class */ (function (_super) {
extras.crm_list = _action.id.replace('view-', '');
}
this.egw.openTab(id, 'addressbook', 'view', extras, {
displayName: data.n_fn + " (" + egw.lang(extras.crm_list) + ")",
displayName: (_action.id.match(/\-organisation/) && data.org_name != "") ? data.org_name
: data.data.n_fn + " (" + egw.lang(extras.crm_list) + ")",
icon: data.photo,
refreshCallback: this.view_refresh,
id: id + '-' + extras.crm_list,

View File

@ -229,7 +229,8 @@ class AddressbookApp extends EgwApp
}
this.egw.openTab(id, 'addressbook', 'view', extras, {
displayName: data.n_fn+" ("+egw.lang(extras.crm_list)+")",
displayName: (_action.id.match(/\-organisation/) && data.org_name != "") ? data.org_name
: data.data.n_fn+" ("+egw.lang(extras.crm_list)+")",
icon: data.photo,
refreshCallback: this.view_refresh,
id: id+'-'+extras.crm_list,