cases changes

This commit is contained in:
Yuri Kuznetsov
2014-11-11 10:57:40 +02:00
parent 0c4c93487d
commit e301514ec6
3 changed files with 50 additions and 2 deletions
@@ -1 +1,8 @@
[{"name":"number","width":15},{"name":"name","width":30,"link":true},{"name":"status","width":15},{"name":"priority","width":15},{"name":"assignedUser","width":15}]
[
{"name":"number","width":12},
{"name":"name","width":30,"link":true},
{"name":"status"},
{"name":"priority"},
{"name":"account"},
{"name":"assignedUser"}
]
@@ -36,7 +36,8 @@
"type": "link"
},
"contact": {
"type": "link"
"type": "link",
"view": "Crm:Case.Fields.Contact"
},
"createdAt": {
"type": "datetime",
@@ -0,0 +1,40 @@
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
Espo.define('Crm:Views.Case.Fields.Contact', 'Views.Fields.Link', function (Dep) {
return Dep.extend({
getSelectFilters: function () {
if (this.model.get('accountId')) {
return {
'account': {
type: 'equals',
field: 'accountId',
value: this.model.get('accountId'),
valueName: this.model.get('accountName'),
}
};
}
},
});
});