diff --git a/application/Espo/Core/SelectManagers/Base.php b/application/Espo/Core/SelectManagers/Base.php index e2c0897803..338865a5d8 100644 --- a/application/Espo/Core/SelectManagers/Base.php +++ b/application/Espo/Core/SelectManagers/Base.php @@ -42,6 +42,8 @@ class Base private $seed = null; + private $userTimeZone = null; + const MIN_LENGTH_FOR_CONTENT_SEARCH = 4; public function __construct($entityManager, \Espo\Entities\User $user, Acl $acl, $metadata) @@ -139,7 +141,7 @@ class Base $where = array(); foreach ($params['where'] as $item) { - if ($item['type'] == 'boolFilters' && !empty($item['value']) && is_array($item['value'])) { + if ($item['type'] == 'bool' && !empty($item['value']) && is_array($item['value'])) { foreach ($item['value'] as $filter) { $p = $this->getBoolFilterWhere($filter); if (!empty($p)) { @@ -151,11 +153,13 @@ class Base if (!empty($item['value'])) { $this->textFilter($item['value'], $result); } + } else if ($item['type'] == 'primary' && !empty($item['value'])) { + $this->primaryFilter($item['value'], $result); } } $linkedWith = array(); - $ignoreList = array('linkedWith', 'boolFilters'); + $ignoreList = array('linkedWith', 'bool', 'primary'); foreach ($params['where'] as $item) { if (!in_array($item['type'], $ignoreList)) { $part = $this->getWherePart($item); @@ -301,6 +305,17 @@ class Base return $result; } + protected function getUserTimeZone() + { + if (empty($this->userTimeZone)) { + $preferences = $this->getEntityManager()->getEntity('Preferences', $this->getUser()->id); + $timeZone = $preferences->get('timeZone'); + $this->userTimeZone = $timeZone; + } + + return $this->userTimeZone; + } + protected function convertDateTimeWhere($item) { $format = 'Y-m-d H:i:s'; @@ -541,6 +556,14 @@ class Base } } + protected function primaryFilter($filterName, &$result) + { + $method = 'filter' . ucfirst($filterName); + if (method_exists($this, $method)) { + $this->$method($result); + } + } + protected function getBoolFilterWhere($filterName) { $method = 'getBoolFilterWhere' . ucfirst($filterName); diff --git a/application/Espo/Core/Templates/Metadata/Base/clientDefs.json b/application/Espo/Core/Templates/Metadata/Base/clientDefs.json index e8985c4a52..05a17bfda9 100644 --- a/application/Espo/Core/Templates/Metadata/Base/clientDefs.json +++ b/application/Espo/Core/Templates/Metadata/Base/clientDefs.json @@ -1,4 +1,4 @@ { "controller": "Controllers.Record", - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Core/Templates/Metadata/Person/clientDefs.json b/application/Espo/Core/Templates/Metadata/Person/clientDefs.json index e8985c4a52..05a17bfda9 100644 --- a/application/Espo/Core/Templates/Metadata/Person/clientDefs.json +++ b/application/Espo/Core/Templates/Metadata/Person/clientDefs.json @@ -1,4 +1,4 @@ { "controller": "Controllers.Record", - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json index 53a3acabc4..b32b4496ff 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Account.json @@ -35,5 +35,5 @@ "create": false } }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Call.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Call.json index efc52a88c5..cc27918c17 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Call.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Call.json @@ -75,37 +75,19 @@ } ] }, - "presetFilters": [ + "filterList": [ { "name":"planned", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["Planned"] - } - } + "style": "primary" }, { "name":"held", - "style": "success", - "data": { - "status": { - "type": "in", - "value": ["Held"] - } - } + "style": "success" }, { "name":"todays", - "style": "info", - "data": { - "dateStart": { - "type": "today", - "dateTime": true - } - } + "style": "info" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json index 458c5b2e4b..a281c022c3 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Campaign.json @@ -34,7 +34,7 @@ "create": false } }, - "presetFilters": [ + "filterList": [ { "name":"active", "style": "primary", @@ -46,5 +46,5 @@ } } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Case.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Case.json index 837fe3008a..6377246bec 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Case.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Case.json @@ -23,27 +23,15 @@ } ] }, - "presetFilters": [ + "filterList": [ { "name":"open", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["New", "Assigned", "Pending"] - } - } + "style": "primary" }, { "name":"closed", - "style": "success", - "data": { - "status": { - "type": "in", - "value": ["Closed"] - } - } + "style": "success" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Contact.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Contact.json index 90b25eff0e..998db2970a 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Contact.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Contact.json @@ -29,5 +29,5 @@ "create": false } }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Document.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Document.json index 2b39916f83..5c98d6561d 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Document.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Document.json @@ -1,6 +1,6 @@ { "controller": "Controllers.Record", - "presetFilters": [ + "filterList": [ { "name":"active", "style": "primary", @@ -22,5 +22,5 @@ } } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Lead.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Lead.json index 9cd77fce6d..785b304251 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Lead.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Lead.json @@ -32,17 +32,11 @@ "create": false } }, - "presetFilters": [ + "filterList": [ { "name":"active", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["New", "Assigned", "In Process"] - } - } + "style": "primary" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Meeting.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Meeting.json index 17a9bc5d6e..17d4c22541 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Meeting.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Meeting.json @@ -75,37 +75,19 @@ } ] }, - "presetFilters": [ + "filterList": [ { "name":"planned", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["Planned"] - } - } + "style": "primary" }, { "name":"held", - "style": "success", - "data": { - "status": { - "type": "in", - "value": ["Held"] - } - } + "style": "success" }, { "name":"todays", - "style": "info", - "data": { - "dateStart": { - "type": "today", - "dateTime": true - } - } + "style": "info" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Opportunity.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Opportunity.json index 45a950d0ed..b71280e7c3 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Opportunity.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Opportunity.json @@ -22,27 +22,15 @@ } ] }, - "presetFilters": [ + "filterList": [ { "name":"open", - "style": "primary", - "data": { - "stage": { - "type": "in", - "value": ["Prospecting", "Qualification", "Needs Analysis", "Value Proposition", "Id. Decision Makers", "Perception Analysis","Proposal/Price Quote","Negotiation/Review"] - } - } + "style": "primary" }, { "name":"won", - "style": "success", - "data": { - "stage": { - "type": "in", - "value": ["Closed Won"] - } - } + "style": "success" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Target.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Target.json index 84b6263567..a35b187a63 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Target.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Target.json @@ -14,5 +14,5 @@ ] } }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/TargetList.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/TargetList.json index e8985c4a52..05a17bfda9 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/TargetList.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/TargetList.json @@ -1,4 +1,4 @@ { "controller": "Controllers.Record", - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json index befa6cc815..04ec7483db 100644 --- a/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json +++ b/application/Espo/Modules/Crm/Resources/metadata/clientDefs/Task.json @@ -7,51 +7,23 @@ "list": "Crm:Task.List", "detail": "Crm:Task.Detail" }, - "presetFilters": [ + "filterList": [ { "name":"actual", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["Not Started", "Started", "Deferred"] - } - } + "style": "primary" }, { "name":"completed", - "style": "success", - "data": { - "status": { - "type": "in", - "value": ["Completed"] - } - } + "style": "success" }, { "name":"todays", - "style": "info", - "data": { - "dateEnd": { - "type": "today", - "dateTime": true - } - } + "style": "info" }, { "name":"overdue", - "style": "danger", - "data": { - "dateEnd": { - "type": "past", - "dateTime": true - }, - "status": { - "type": "in", - "value": ["Not Started", "Started"] - } - } + "style": "danger" } ], - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Modules/Crm/SelectManagers/Call.php b/application/Espo/Modules/Crm/SelectManagers/Call.php index 2abae97a29..478765fc87 100644 --- a/application/Espo/Modules/Crm/SelectManagers/Call.php +++ b/application/Espo/Modules/Crm/SelectManagers/Call.php @@ -33,5 +33,28 @@ class Call extends \Espo\Core\SelectManagers\Base 'user.id' => $this->getUser()->id ); } + + protected function filterPlanned(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Planned' + ); + } + + protected function filterHeld(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Held' + ); + } + + protected function filterTodays(&$result) + { + $result['whereClause'][] = $this->convertDateTimeWhere(array( + 'type' => 'today', + 'field' => 'dateStart', + 'timeZone' => $this->getUserTimeZone() + )); + } } diff --git a/application/Espo/Modules/Crm/SelectManagers/CaseObj.php b/application/Espo/Modules/Crm/SelectManagers/CaseObj.php index 593a8d9823..601cc7e340 100644 --- a/application/Espo/Modules/Crm/SelectManagers/CaseObj.php +++ b/application/Espo/Modules/Crm/SelectManagers/CaseObj.php @@ -25,10 +25,22 @@ namespace Espo\Modules\Crm\SelectManagers; class CaseObj extends \Espo\Core\SelectManagers\Base { protected function boolFilterOpen(&$result) + { + $this->filterOpen($result); + } + + protected function filterOpen(&$result) { $result['whereClause'][] = array( 'status!=' => array('Duplicate', 'Rejected', 'Closed') ); } + + protected function filterClosed(&$result) + { + $result['whereClause'][] = array( + 'status' => array('Closed') + ); + } } diff --git a/application/Espo/Modules/Crm/SelectManagers/Lead.php b/application/Espo/Modules/Crm/SelectManagers/Lead.php new file mode 100644 index 0000000000..641580ffec --- /dev/null +++ b/application/Espo/Modules/Crm/SelectManagers/Lead.php @@ -0,0 +1,35 @@ + ['Converted', 'Recycled', 'Dead'] + ); + } + + } + diff --git a/application/Espo/Modules/Crm/SelectManagers/Meeting.php b/application/Espo/Modules/Crm/SelectManagers/Meeting.php index 447d281850..915a7de45b 100644 --- a/application/Espo/Modules/Crm/SelectManagers/Meeting.php +++ b/application/Espo/Modules/Crm/SelectManagers/Meeting.php @@ -33,5 +33,28 @@ class Meeting extends \Espo\Core\SelectManagers\Base 'user.id' => $this->getUser()->id ); } + + protected function filterPlanned(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Planned' + ); + } + + protected function filterHeld(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Held' + ); + } + + protected function filterTodays(&$result) + { + $result['whereClause'][] = $this->convertDateTimeWhere(array( + 'type' => 'today', + 'field' => 'dateStart', + 'timeZone' => $this->getUserTimeZone() + )); + } } diff --git a/application/Espo/Modules/Crm/SelectManagers/Opportunity.php b/application/Espo/Modules/Crm/SelectManagers/Opportunity.php new file mode 100644 index 0000000000..f289a6cc73 --- /dev/null +++ b/application/Espo/Modules/Crm/SelectManagers/Opportunity.php @@ -0,0 +1,42 @@ + array('Closed Won', 'Closed Lost') + ); + } + + protected function filterWon(&$result) + { + $result['whereClause'][] = array( + 'stage=' => 'Closed Won' + ); + } + + } + diff --git a/application/Espo/Modules/Crm/SelectManagers/Task.php b/application/Espo/Modules/Crm/SelectManagers/Task.php index d060f73a76..d64deabaaf 100644 --- a/application/Espo/Modules/Crm/SelectManagers/Task.php +++ b/application/Espo/Modules/Crm/SelectManagers/Task.php @@ -25,19 +25,45 @@ namespace Espo\Modules\Crm\SelectManagers; class Task extends \Espo\Core\SelectManagers\Base { protected function boolFilterActual(&$result) + { + $this->filterActual($result); + } + + protected function boolFilterCompleted(&$result) + { + $this->filterCompleted($result); + } + + protected function filterActual(&$result) { $result['whereClause'][] = array( 'status!=' => array('Completed', 'Canceled') ); } - protected function boolFilterCompleted(&$result) + protected function filterCompleted(&$result) { $result['whereClause'][] = array( 'status' => array('Completed') ); } + protected function filterOverdue(&$result) + { + $result['whereClause'][] = [ + $this->convertDateTimeWhere(array( + 'type' => 'past', + 'field' => 'dateEnd', + 'timeZone' => $this->getUserTimeZone() + )), + [ + array( + 'status!=' => ['Completed', 'Canceled'] + ) + ] + ]; + } + protected function convertDateTimeWhere($item) { $result = parent::convertDateTimeWhere($item); diff --git a/application/Espo/Resources/metadata/clientDefs/Email.json b/application/Espo/Resources/metadata/clientDefs/Email.json index 9b7558c361..b4092aec30 100644 --- a/application/Espo/Resources/metadata/clientDefs/Email.json +++ b/application/Espo/Resources/metadata/clientDefs/Email.json @@ -53,36 +53,18 @@ ] } }, - "presetFilters": [ + "filterList": [ { "name":"archived", - "style": "primary", - "data": { - "status": { - "type": "in", - "value": ["Archived"] - } - } + "style": "primary" }, { "name":"sent", - "style": "info", - "data": { - "status": { - "type": "in", - "value": ["Sent"] - } - } + "style": "info" }, { "name":"draft", - "style": "default", - "data": { - "status": { - "type": "in", - "value": ["Draft"] - } - } + "style": "default" } ], "defaultFilterData": { @@ -90,12 +72,7 @@ "onlyMy": true }, "presetName": "archived", - "advanced": { - "status": { - "type": "in", - "value": ["Archived"] - } - } + "primary": "archived" }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json b/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json index 76de4c9aee..33da46216f 100644 --- a/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json +++ b/application/Espo/Resources/metadata/clientDefs/EmailTemplate.json @@ -4,5 +4,5 @@ "edit": "EmailTemplate.Record.Edit", "detail": "EmailTemplate.Record.Detail" }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Resources/metadata/clientDefs/Team.json b/application/Espo/Resources/metadata/clientDefs/Team.json index 9503f16774..de25fa5d15 100644 --- a/application/Espo/Resources/metadata/clientDefs/Team.json +++ b/application/Espo/Resources/metadata/clientDefs/Team.json @@ -11,5 +11,5 @@ "edit":"Team.Record.Edit", "list":"Team.Record.List" }, - "boolFilters": ["onlyMy"] + "boolFilterList": ["onlyMy"] } diff --git a/application/Espo/Resources/metadata/clientDefs/User.json b/application/Espo/Resources/metadata/clientDefs/User.json index d17d30132d..0045cb9b3d 100644 --- a/application/Espo/Resources/metadata/clientDefs/User.json +++ b/application/Espo/Resources/metadata/clientDefs/User.json @@ -5,5 +5,5 @@ "editQuick":"User.Record.Edit", "list":"User.Record.List" }, - "boolFilters": ["onlyMyTeam"] + "boolFilterList": ["onlyMyTeam"] } diff --git a/application/Espo/SelectManagers/Email.php b/application/Espo/SelectManagers/Email.php index 64003c9b74..31b7ac28e0 100644 --- a/application/Espo/SelectManagers/Email.php +++ b/application/Espo/SelectManagers/Email.php @@ -34,6 +34,27 @@ class Email extends \Espo\Core\SelectManagers\Base ); } + protected function filterArchived(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Archived' + ); + } + + protected function filterSent(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Sent' + ); + } + + protected function filterDraft(&$result) + { + $result['whereClause'][] = array( + 'status' => 'Draft' + ); + } + protected function accessOnlyOwn(&$result) { $this->boolFilterOnlyMy($result); diff --git a/frontend/client/modules/crm/src/views/dashlets/calls.js b/frontend/client/modules/crm/src/views/dashlets/calls.js index a1cc886294..7ab37d76ee 100644 --- a/frontend/client/modules/crm/src/views/dashlets/calls.js +++ b/frontend/client/modules/crm/src/views/dashlets/calls.js @@ -50,11 +50,8 @@ Espo.define('Crm:Views.Dashlets.Calls', 'Views.Dashlets.Abstract.RecordList', fu bool: { onlyMy: true, }, + primary: 'planned', advanced: { - 'status': { - type: 'in', - value: ['Planned'] - }, '1': { type: 'or', value: { diff --git a/frontend/client/modules/crm/src/views/dashlets/cases.js b/frontend/client/modules/crm/src/views/dashlets/cases.js index 3e75a735f6..2a0d105821 100644 --- a/frontend/client/modules/crm/src/views/dashlets/cases.js +++ b/frontend/client/modules/crm/src/views/dashlets/cases.js @@ -59,8 +59,8 @@ Espo.define('Crm:Views.Dashlets.Cases', 'Views.Dashlets.Abstract.RecordList', fu searchData: { bool: { onlyMy: true, - open: true - } + }, + primary: 'open' }, }, diff --git a/frontend/client/modules/crm/src/views/dashlets/leads.js b/frontend/client/modules/crm/src/views/dashlets/leads.js index 887ede210c..7b56ad7f9d 100644 --- a/frontend/client/modules/crm/src/views/dashlets/leads.js +++ b/frontend/client/modules/crm/src/views/dashlets/leads.js @@ -56,13 +56,7 @@ Espo.define('Crm:Views.Dashlets.Leads', 'Views.Dashlets.Abstract.RecordList', fu bool: { onlyMy: true, }, - advanced: { - status: { - type: 'notIn', - value: ['Converted', 'Hoax', 'Dead'] - }, - }, - + primary: 'active' }, }, diff --git a/frontend/client/modules/crm/src/views/dashlets/meetings.js b/frontend/client/modules/crm/src/views/dashlets/meetings.js index 5a9f56401c..86f6bda378 100644 --- a/frontend/client/modules/crm/src/views/dashlets/meetings.js +++ b/frontend/client/modules/crm/src/views/dashlets/meetings.js @@ -50,11 +50,8 @@ Espo.define('Crm:Views.Dashlets.Meetings', 'Views.Dashlets.Abstract.RecordList', bool: { onlyMy: true, }, + primary: 'Planned', advanced: { - 'status': { - type: 'in', - value: ['Planned'] - }, '1': { type: 'or', value: { diff --git a/frontend/client/modules/crm/src/views/dashlets/opportunities.js b/frontend/client/modules/crm/src/views/dashlets/opportunities.js index 890cad0ae5..0dc973fc12 100644 --- a/frontend/client/modules/crm/src/views/dashlets/opportunities.js +++ b/frontend/client/modules/crm/src/views/dashlets/opportunities.js @@ -54,12 +54,7 @@ Espo.define('Crm:Views.Dashlets.Opportunities', 'Views.Dashlets.Abstract.RecordL bool: { onlyMy: true }, - advanced: { - "stage": { - type: 'notIn', - value: ['Closed Won', 'Closed Lost'] - } - } + primary: 'open' }, }, diff --git a/frontend/client/modules/crm/src/views/dashlets/tasks.js b/frontend/client/modules/crm/src/views/dashlets/tasks.js index 1da7f3f119..9eb639a7e4 100644 --- a/frontend/client/modules/crm/src/views/dashlets/tasks.js +++ b/frontend/client/modules/crm/src/views/dashlets/tasks.js @@ -17,7 +17,7 @@ * * 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.Dashlets.Tasks', 'Views.Dashlets.Abstract.RecordList', function (Dep) { @@ -51,9 +51,9 @@ Espo.define('Crm:Views.Dashlets.Tasks', 'Views.Dashlets.Abstract.RecordList', fu }, searchData: { bool: { - onlyMy: true, - actual: true - } + onlyMy: true + }, + primary: 'actual' }, }, diff --git a/frontend/client/res/templates/record/search.tpl b/frontend/client/res/templates/record/search.tpl index f5dd29d66f..7ee78572b7 100644 --- a/frontend/client/res/templates/record/search.tpl +++ b/frontend/client/res/templates/record/search.tpl @@ -3,30 +3,32 @@