email account active filter

This commit is contained in:
Yuri Kuznetsov
2024-05-02 12:24:57 +03:00
parent 40c8d0063d
commit 8cf31f17cb
5 changed files with 55 additions and 0 deletions
@@ -0,0 +1,42 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM Open Source CRM application.
* Copyright (C) 2014-2024 Yurii Kuznietsov, Taras Machyshyn, Oleksii Avramenko
* Website: https://www.espocrm.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU Affero General Public License version 3.
*
* In accordance with Section 7(b) of the GNU Affero General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
namespace Espo\Classes\Select\EmailAccount\PrimaryFilters;
use Espo\Core\Select\Primary\Filter;
use Espo\Entities\EmailFilter;
use Espo\ORM\Query\SelectBuilder as QueryBuilder;
class Active implements Filter
{
public function apply(QueryBuilder $queryBuilder): void
{
$queryBuilder->where(['status' => EmailFilter::STATUS_ACTIVE]);
}
}
@@ -40,6 +40,8 @@ class EmailFilter extends Entity
public const ACTION_MOVE_TO_GROUP_FOLDER = 'Move to Group Folder';
public const ACTION_NONE = 'None';
public const STATUS_ACTIVE = 'Active';
/**
* @return self::ACTION_*|null
*/
@@ -47,6 +47,9 @@
"Send Test Email": "Send Test Email",
"SMTP": "SMTP"
},
"presetFilters": {
"active": "Active"
},
"messages": {
"couldNotConnectToImap": "Could not connect to IMAP server",
"connectionIsOk": "Connection is Ok"
@@ -84,6 +84,11 @@
}
}
},
"filterList": [
{
"name": "active"
}
],
"relationshipPanels": {
"filters": {
"select": false,
@@ -1,5 +1,8 @@
{
"accessControlFilterClassNameMap": {
"mandatory": "Espo\\Classes\\Select\\EmailAccount\\AccessControlFilters\\Mandatory"
},
"primaryFilterClassNameMap": {
"active": "Espo\\Classes\\Select\\EmailAccount\\PrimaryFilters\\Active"
}
}