Compare commits

...

177 Commits
3.2.1 ... 3.3.0

Author SHA1 Message Date
yuri
b27b356997 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-13 13:40:35 +03:00
yuri
3b76eec06c cleanup 2015-05-13 12:18:40 +03:00
yuri
04a768ee40 fix filter style 2015-05-13 12:07:46 +03:00
Taras Machyshyn
0a3490d4f2 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-13 11:53:55 +03:00
Taras Machyshyn
df71605c47 Fixed a bug with username of installer 2015-05-13 11:53:42 +03:00
yuri
7424828f0c remove account filters 2015-05-13 11:27:48 +03:00
yuri
c9c759f33b Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-13 11:15:09 +03:00
yuri
98835fdb6c fix uk_UA lang 2015-05-13 11:14:57 +03:00
Taras Machyshyn
d32887ed40 Improved some descriptions 2015-05-13 11:02:17 +03:00
yuri
6dd7573f7b fix followed filter 2015-05-13 10:44:16 +03:00
yuri
0027e1bf9a fix invitartion 2015-05-12 15:21:24 +03:00
Taras Machyshyn
eb10aa33d6 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-12 12:16:54 +03:00
Taras Machyshyn
cfe77569f1 Changed footer 2015-05-12 12:16:43 +03:00
yuri
62da3462bc follow button improvement 2015-05-12 11:35:27 +03:00
yuri
334b0baacc email account: email address 2015-05-12 11:35:10 +03:00
yuri
d16d177eaf entity manager: order 2015-05-11 15:17:58 +03:00
yuri
2966f158fe fix campaign 2015-05-11 13:07:43 +03:00
yuri
1f57bcb250 Merge branch 'master' of https://github.com/espocrm/espocrm 2015-05-11 12:32:38 +03:00
yuri
90e775c27a fix multi enum search 2015-05-11 12:30:36 +03:00
yuri
9ff47844e7 fix fetch 2015-05-11 12:09:51 +03:00
yuri
042d98d05b fetch for bottom and side views 2015-05-11 12:06:20 +03:00
yuri
0533c5a3ef sticked panels 2015-05-11 11:34:51 +03:00
yuri
0325f637b2 monitoredFolders tooltip 2015-05-11 11:27:17 +03:00
yuri
3d2bfe48b9 show stream count 2015-05-11 11:08:58 +03:00
yuri
c8a538d73e cleanup 2015-05-11 11:04:06 +03:00
yuri
fbc171b07f update fr_FR 2015-05-11 11:03:13 +03:00
yuri
70e4921961 fix email import 2015-05-11 11:00:46 +03:00
Yuri Kuznetsov
1ca96c7ca8 Update README.md 2015-05-09 10:04:58 +03:00
yuri
65359f103f disable task stream 2015-05-08 17:18:27 +03:00
yuri
e5afffbde1 datetimeOptional fix 2015-05-08 12:51:09 +03:00
yuri
66364e91b7 datetimeOptional field type and task stream 2015-05-08 12:38:52 +03:00
yuri
567ca19398 converted to panel change 2015-05-08 11:51:03 +03:00
yuri
1e073def9d footer catch 2015-05-08 11:24:31 +03:00
yuri
70c772dfd2 note.related_id 2015-05-08 10:58:44 +03:00
yuri
709259f45e fix task complete button 2015-05-07 18:19:41 +03:00
yuri
dca51642e3 email userse filter 2015-05-07 17:59:02 +03:00
yuri
f24aea6354 followCreateEntities field 2015-05-07 15:05:22 +03:00
yuri
c020cd4251 followed filter 2015-05-07 14:14:42 +03:00
yuri
452e2ddc51 css changes 2015-05-07 11:59:03 +03:00
yuri
1860c69313 fix filters css 2015-05-07 11:49:59 +03:00
yuri
201beca8fa audited change 2015-05-07 11:22:52 +03:00
yuri
9182aeef99 Followed bool filter 2015-05-07 11:11:27 +03:00
yuri
d2cb7f60de stream status changes 2015-05-07 10:35:52 +03:00
yuri
c6beb0aac3 inCategory search 2015-05-06 17:38:41 +03:00
yuri
e394b12888 fix linkedWith 2015-05-06 16:06:28 +03:00
yuri
a461c8515f Merge branch 'master' into feature/tree 2015-05-06 15:45:40 +03:00
yuri
9bb36e1a35 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-06 15:39:55 +03:00
yuri
1a5c75daac remove oveflow hidden for .field 2015-05-06 15:23:58 +03:00
yuri
2c7633e74d task detailSmall change 2015-05-06 15:22:53 +03:00
yuri
996ad352e1 create task from email 2015-05-06 15:18:56 +03:00
yuri
5c4b0d7723 change link field tpl 2015-05-06 14:31:46 +03:00
yuri
6485ed38d6 layouts ability to add new 2015-05-06 12:22:48 +03:00
yuri
48d9c0a7ff sort entity manager 2015-05-06 12:08:31 +03:00
yuri
40c4b77cbf field tpl changes 2015-05-06 12:01:03 +03:00
Taras Machyshyn
9b0ed1c833 Added possibility to define custom tables in metadata under 'additionalTables' option 2015-05-06 11:17:39 +03:00
yuri
bc6e74a092 compose email body height 2015-05-06 11:13:31 +03:00
yuri
52bdb136d4 fix wtsiwyg 2015-05-06 11:06:58 +03:00
yuri
f0e77da5d4 overflow hidden for field 2015-05-06 10:56:57 +03:00
yuri
0b77c4cdfe move inbound email to core 2015-05-06 10:40:22 +03:00
yuri
2efa0c0ca7 lang 2015-05-06 10:00:11 +03:00
yuri
87892c799c dev 2015-05-05 17:25:37 +03:00
yuri
5bfa258881 dev 2015-05-05 15:58:07 +03:00
yuri
d742de40c5 fix get imap folders ssl 2015-05-05 13:51:43 +03:00
yuri
bb3bd0e915 dev 2015-05-05 13:38:11 +03:00
yuri
8d50f52b7f cleanup 2015-05-05 11:39:57 +03:00
yuri
bd2fd5eb3a Merge branch 'master' into feature/tree 2015-05-05 11:38:51 +03:00
yuri
2db25fda63 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-05 11:38:36 +03:00
yuri
3067abcac2 save calendar view 2015-05-05 11:30:29 +03:00
yuri
c0c77e6e6b task attachments 2015-05-05 11:23:35 +03:00
Taras Machyshyn
4037ffa295 Changed 'relationName' to camelCase 2015-05-05 10:49:44 +03:00
Taras Machyshyn
2aa263847f Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-05 10:30:08 +03:00
Taras Machyshyn
50f9f24887 OrmMetadata: fixed 'midKeys' merging priority 2015-05-05 10:29:52 +03:00
yuri
e36ee5aaff link multiple <div> 2015-05-05 10:14:03 +03:00
yuri
6d8017f1dc fix link manager 2015-05-04 16:00:03 +03:00
yuri
d22ce60f7b fix link manager 2015-05-04 15:48:58 +03:00
yuri
bc7d4f214f fix email preview 2015-05-04 15:34:03 +03:00
yuri
daa80d7196 Merge branch 'master' of ssh://172.20.0.1/var/git/espo/backend 2015-05-04 15:23:49 +03:00
yuri
8d3da43dca list buttonDisabled 2015-05-04 15:23:25 +03:00
yuri
15b329580c fix layout 2015-05-04 15:19:41 +03:00
yuri
0e2f8d9bf9 fix email link 2015-05-04 15:15:39 +03:00
yuri
951d68724b acl imporvements 2015-05-04 12:24:32 +03:00
yuri
f678253b05 fix outbound email encoding 2015-05-04 11:11:08 +03:00
yuri
0603eaf48d dev 2015-05-04 10:35:24 +03:00
yuri
753caf7eeb dev 2015-05-01 17:32:28 +03:00
yuri
5dbf719a53 gitignore 2015-05-01 17:31:38 +03:00
yuri
1e945cff41 dev 2015-05-01 13:14:20 +03:00
Taras Machyshyn
4a1237cdcc Translation corrections 2015-05-01 12:51:40 +03:00
Taras Machyshyn
b60e65379e Improved ScheduledJobLog 2015-05-01 12:03:17 +03:00
yuri
6da4e1796b dev 2015-04-30 15:55:07 +03:00
yuri
2666f05bd5 dev 2015-04-30 15:02:21 +03:00
Taras Machyshyn
461bffbf02 Jobs: improved scheduledJobLog 2015-04-30 13:07:54 +03:00
yuri
2653bba158 dev 2015-04-30 12:14:47 +03:00
yuri
56d73519bf dev 2015-04-29 18:27:54 +03:00
yuri
df3a7d78f4 dev 2015-04-29 17:39:17 +03:00
Taras Machyshyn
898a7d89c7 Fixed ScheduledJobLog clean-up 2015-04-29 17:17:00 +03:00
yuri
2734b9bf8c dev 2015-04-29 16:33:44 +03:00
yuri
2c074c6e82 dev 2015-04-28 18:09:17 +03:00
yuri
1e67fe69e1 dev 2015-04-28 17:53:31 +03:00
Taras Machyshyn
08cf333c0c Metadata: optimization 2015-04-28 15:38:45 +03:00
Taras Machyshyn
0f62d7da13 Metadata: code improvements 2015-04-28 15:28:26 +03:00
Taras Machyshyn
8ce806d41f Metadata: renamed option 'skip' to 'skipOrmDefs' 2015-04-28 14:54:43 +03:00
Taras Machyshyn
59a564cc1b FieldManager fixes 2015-04-28 14:40:50 +03:00
Taras Machyshyn
1135573af6 Metadata changes: generated fields now added to metadata 2015-04-28 11:59:05 +03:00
yuri
c9a1e3733c listSmall 2015-04-28 10:16:41 +03:00
yuri
6dbeba3473 quick view more quicker 2015-04-24 13:22:19 +03:00
yuri
351087781e fix email inbox 2015-04-24 12:37:03 +03:00
yuri
92f977d6c2 camelCase aliases 2015-04-24 11:45:27 +03:00
yuri
489fbb8800 fix search 2015-04-24 11:26:38 +03:00
yuri
159c19fe08 conflict fix 2015-04-24 10:43:36 +03:00
yuri
c13e46554d change upgrade done message 2015-04-24 10:14:17 +03:00
yuri
6f45e26028 version 2015-04-24 10:04:19 +03:00
yuri
7e02481b35 version 2015-04-24 09:59:16 +03:00
yuri
79e94a8255 Merge branch 'hotfix/3.2.2' 2015-04-24 09:54:11 +03:00
yuri
288398d4c2 fix preferences decode 2015-04-23 17:18:23 +03:00
yuri
92afc4deee cleanup 2015-04-23 15:49:05 +03:00
Taras Machyshyn
f6892877c1 Extension can be installed with the same version 2015-04-23 15:44:31 +03:00
yuri
30c57921d1 refresh for extensions and upgrades installed 2015-04-23 15:30:11 +03:00
yuri
d23bf569c0 cleanup 2015-04-23 15:22:29 +03:00
yuri
796830d2dd set not held row action 2015-04-23 15:17:47 +03:00
yuri
286ec0325d set held mass action 2015-04-23 15:15:08 +03:00
yuri
c8338e1759 link filter change 2015-04-23 12:34:35 +03:00
yuri
5f8adf51c1 Merge branch 'hotfix/3.2.2' 2015-04-23 11:57:10 +03:00
yuri
c7cc44edf6 Merge branch 'hotfix/3.2.2' of ssh://172.20.0.1/var/git/espo/backend into hotfix/3.2.2 2015-04-23 11:56:41 +03:00
yuri
e958d7c488 fix inbound email 2015-04-23 11:55:25 +03:00
Taras Machyshyn
77ff11990b Installer: disable prompt password saving while installing 2015-04-23 11:48:23 +03:00
yuri
e1538a5028 fix acl 2015-04-23 11:40:55 +03:00
Taras Machyshyn
994e0c1eda Extensions: improved restore functionality of install script 2015-04-23 10:48:42 +03:00
Taras Machyshyn
d51e88be60 Minor bug fixes for fileManager 2015-04-23 10:42:24 +03:00
yuri
b1ba07a995 task date completed 2015-04-22 17:07:32 +03:00
yuri
146a7aba1f filters 2015-04-22 16:43:45 +03:00
yuri
981c60c78a fix plain text 2015-04-22 16:28:04 +03:00
yuri
2e85e7fc56 email: show plain 2015-04-22 16:26:30 +03:00
yuri
99edab675a create contact from email 2015-04-22 16:12:55 +03:00
yuri
1a8d3a3cdf fix rerender on remove from list 2015-04-22 15:29:40 +03:00
yuri
43abd1740e modals change 2015-04-22 15:01:09 +03:00
yuri
261d60f338 cleanup 2015-04-22 11:20:19 +03:00
yuri
1a36d7758b reply to all be default 2015-04-22 11:08:22 +03:00
yuri
c09fc39881 fix image crop 2015-04-22 10:46:30 +03:00
yuri
0a7cd28ab5 assignedUser not required for Account/Contact/Lead 2015-04-22 10:27:10 +03:00
yuri
bf8bf5e4d9 fix link parent 2015-04-22 10:19:51 +03:00
yuri
1defafd258 remove async false 2015-04-22 10:13:10 +03:00
yuri
4854133f46 fix in acl table 2015-04-22 10:04:01 +03:00
yuri
d93879a24d cleanup 2015-04-21 18:01:36 +03:00
yuri
8ff6d2063c fix calendar modal 2015-04-21 17:59:21 +03:00
yuri
a46ecce6d0 not held in history 2015-04-21 17:57:19 +03:00
yuri
49175ae1b1 fix compose email modal 2015-04-21 17:40:45 +03:00
yuri
532473df15 fix modal 2015-04-21 17:14:38 +03:00
yuri
252ba4dccc modal buttonList 2015-04-21 17:11:02 +03:00
yuri
1ddac304d7 Email drafts filter 2015-04-21 16:12:41 +03:00
yuri
44ecebad03 translateOption Global by default 2015-04-21 15:42:48 +03:00
yuri
67d8c6cb17 version number in upgrade page 2015-04-21 15:40:50 +03:00
yuri
c52ca7244f reply prefix changes 2015-04-21 15:35:42 +03:00
yuri
b42b276054 cleanup 2015-04-21 14:39:07 +03:00
yuri
619a279dbb isEditable 2015-04-21 14:34:53 +03:00
yuri
56e0c9928e dont show email content in note if not parent view 2015-04-21 12:29:46 +03:00
yuri
25a424266b filters change 2015-04-21 12:19:14 +03:00
yuri
c8b13e07b1 Merge branch 'hotfix/3.2.1' 2015-04-17 16:05:19 +03:00
yuri
48cf4a6ed6 admin panel: outbound email change 2015-04-17 12:35:46 +03:00
yuri
9de2b5f7ef Merge branch 'hotfix/3.2.1' 2015-04-17 11:57:14 +03:00
yuri
7d7234a226 some change with filters 2015-04-17 11:31:31 +03:00
yuri
a7517bed9d document file field change 2015-04-17 10:48:01 +03:00
yuri
66fca4dadd change documents listSmall 2015-04-16 17:15:29 +03:00
yuri
645b64437f change email ack 2015-04-16 17:12:18 +03:00
yuri
efa2755f19 acl refactor 2 2015-04-16 16:36:26 +03:00
yuri
4fe0f53878 acl refactor 2015-04-16 12:39:56 +03:00
yuri
5db5b41f7f email notification change 2015-04-15 17:36:53 +03:00
yuri
909aa49e39 email notificator change 2015-04-15 16:42:48 +03:00
yuri
dd3d09f895 fix email note 2015-04-15 16:36:49 +03:00
yuri
395182bda5 filter layout 2015-04-15 16:27:27 +03:00
yuri
fd7d73756a email improvement 2015-04-15 15:47:10 +03:00
yuri
aff95d47dd Merge branch 'hotfix/3.2.1' 2015-04-15 12:11:13 +03:00
yuri
9f72d65281 Merge branch 'hotfix/3.2.1' 2015-04-15 11:02:30 +03:00
yuri
669cc2b883 defaultReminders 2015-04-14 17:35:31 +03:00
yuri
dec262e999 cleanup 2015-04-14 16:47:30 +03:00
yuri
cb03047ac3 rowActionsView prop 2015-04-14 16:42:13 +03:00
yuri
8c5f94ace4 view and edit for record dashlet 2015-04-14 16:40:18 +03:00
yuri
6269f02bca filters improvements 2015-04-14 16:22:42 +03:00
359 changed files with 7249 additions and 2814 deletions

2
.gitignore vendored
View File

@@ -13,4 +13,4 @@
/tests/testData/cache/*
composer.phar
vendor/
/custom/Espo/Custom/Resources/*
/custom/Espo/Custom/*

View File

@@ -6,6 +6,13 @@ It's a web application with a frontend designed as a single page application bas
Download the latest release from our [website](http://www.espocrm.com).
### Requirements
* PHP 5.4 or above (with pdo, json, gd, mcrypt extensions);
* MySQL 5.1 or above.
For more information about server configuration see [this article](http://blog.espocrm.com/administration/server-configuration-for-espocrm/).
### How to report bug
Create an issue [here](https://github.com/espocrm/espocrm/issues) or post on our [forum](http://forum.espocrm.com/bug-reports?routestring=forum/bug-reports).

View File

@@ -0,0 +1,72 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Acl;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class Email extends \Espo\Core\Acl\Base
{
public function checkEntityRead(User $user, Entity $entity, $data)
{
if ($this->checkEntity($user, $entity, $data, 'read')) {
return true;
}
if ($data === false) {
return false;
}
if (is_array($data)) {
if (empty($data['read']) || $data['read'] == 'no') {
return false;
}
}
if (!$entity->has('usersIds')) {
$entity->loadLinkMultipleField('users');
}
$userIdList = $entity->get('usersIds');
if (is_array($userIdList) && in_array($user->id, $userIdList)) {
return true;
}
return false;
}
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('assignedUserId')) {
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
}
if ($user->id === $entity->get('createdById')) {
return true;
}
return false;
}
}

View File

@@ -33,7 +33,7 @@ class App extends \Espo\Core\Controllers\Base
return array(
'user' => $this->getUser()->toArray(),
'acl' => $this->getAcl()->toArray(),
'acl' => $this->getAcl()->getMap(),
'preferences' => $preferences,
'token' => $this->getUser()->get('token')
);

View File

@@ -31,7 +31,7 @@ class EmailAccount extends \Espo\Core\Controllers\Record
return $this->getRecordService()->getFolders(array(
'host' => $request->get('host'),
'port' => $request->get('port'),
'ssl' => $request->get('ssl'),
'ssl' => $request->get('ssl') === 'true',
'username' => $request->get('username'),
'password' => $request->get('password'),
'id' => $request->get('id')

View File

@@ -62,6 +62,12 @@ class EntityManager extends \Espo\Core\Controllers\Base
if (!empty($data['stream'])) {
$params['stream'] = $data['stream'];
}
if (!empty($data['sortBy'])) {
$params['sortBy'] = $data['sortBy'];
}
if (!empty($data['sortDirection'])) {
$params['asc'] = $data['sortDirection'] === 'asc';
}
$result = $this->getContainer()->get('entityManagerUtil')->create($name, $type, $params);
@@ -90,6 +96,10 @@ class EntityManager extends \Espo\Core\Controllers\Base
$name = $data['name'];
$name = filter_var($name, \FILTER_SANITIZE_STRING);
if (!empty($data['sortDirection'])) {
$data['asc'] = $data['sortDirection'] === 'asc';
}
$result = $this->getContainer()->get('entityManagerUtil')->update($name, $data);
if ($result) {

View File

@@ -20,7 +20,7 @@
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
namespace Espo\Controllers;
class InboundEmail extends \Espo\Core\Controllers\Record
{
@@ -36,7 +36,7 @@ class InboundEmail extends \Espo\Core\Controllers\Record
return $this->getRecordService()->getFolders(array(
'host' => $request->get('host'),
'port' => $request->get('port'),
'ssl' => $request->get('ssl'),
'ssl' => $request->get('ssl') === 'true',
'username' => $request->get('username'),
'password' => $request->get('password'),
'id' => $request->get('id')

View File

@@ -45,9 +45,7 @@ class User extends \Espo\Core\Controllers\Record
throw new NotFound();
}
$acl = new \Espo\Core\Acl($user, $this->getConfig(), $this->getContainer()->get('fileManager'), $this->getMetadata());
return $acl->toArray();
return $this->getAclManager()->getMap($user);
}
public function actionChangeOwnPassword($params, $data, $request)
@@ -89,7 +87,7 @@ class User extends \Espo\Core\Controllers\Record
if (!$request->isPost()) {
throw new Forbidden();
}
if (empty($data['userName']) || empty($data['emailAddress'])) {
throw new BadRequest();
}

View File

@@ -22,305 +22,61 @@
namespace Espo\Core;
use \Espo\Core\Exceptions\Error;
use \Espo\ORM\Entity;
class Acl
{
private $data = array(
'table' => array()
);
private $user;
private $cacheFile;
private $aclManager;
private $actionList = array('read', 'edit', 'delete');
private $levelList = array('all', 'team', 'own', 'no');
protected $fileManager;
protected $metadata;
public function __construct(\Espo\Entities\User $user, $config = null, $fileManager = null, $metadata = null)
public function __construct(AclManager $aclManager, \Espo\Entities\User $user)
{
$this->aclManager = $aclManager;
$this->user = $user;
$this->metadata = $metadata;
if (!$this->user->isFetched()) {
throw new Error();
}
$this->user->loadLinkMultipleField('teams');
if ($fileManager) {
$this->fileManager = $fileManager;
}
$this->cacheFile = 'data/cache/application/acl/' . $user->id . '.php';
if ($config && $config->get('useCache') && file_exists($this->cacheFile)) {
$cached = include $this->cacheFile;
$this->data = $cached;
$this->initSolid();
} else {
$this->load();
$this->initSolid();
if ($config && $fileManager && $config->get('useCache')) {
$this->buildCache();
}
}
}
public function checkScope($scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
protected function getAclManager()
{
if (array_key_exists($scope, $this->data['table'])) {
if ($this->data['table'][$scope] === false) {
return false;
}
if ($this->data['table'][$scope] === true) {
return true;
}
if (!is_null($action)) {
if (array_key_exists($action, $this->data['table'][$scope])) {
$value = $this->data['table'][$scope][$action];
if ($value === 'all' || $value === true) {
return true;
}
if (!$value || $value === 'no') {
return false;
}
if (is_null($isOwner)) {
return true;
}
if ($isOwner) {
if ($value === 'own' || $value === 'team') {
return true;
}
}
if ($inTeam === null && $entity) {
$inTeam = $this->checkInTeam($entity);
}
if ($inTeam) {
if ($value === 'team') {
return true;
}
}
return false;
}
}
return true;
}
return true;
return $this->aclManager;
}
public function toArray()
protected function getUser()
{
return $this->data;
return $this->user;
}
public function get($permission)
public function getMap()
{
if ($this->user->isAdmin()) {
return true;
}
if ($permission == 'table') {
return null;
}
if (array_key_exists($permission, $this->data)) {
return $this->data[$permission];
}
return null;
return $this->getAclManager()->getMap($this->getUser());
}
public function getLevel($scope, $action)
{
if ($this->user->isAdmin()) {
return 'all';
}
if (array_key_exists($scope, $this->data['table'])) {
if (array_key_exists($action, $this->data['table'][$scope])) {
return $this->data['table'][$scope][$action];
}
}
return false;
return $this->getAclManager()->getLevel($this->getUser(), $scope, $action);
}
public function check($subject, $action = null, $isOwner = null, $inTeam = null)
public function get($permission)
{
if ($this->user->isAdmin()) {
return true;
}
if (is_string($subject)) {
return $this->checkScope($subject, $action, $isOwner, $inTeam);
} else {
$entity = $subject;
if ($entity instanceof Entity) {
$entityName = $entity->getEntityName();
return $this->checkScope($entityName, $action, $this->checkIsOwner($entity), $inTeam, $entity);
}
}
return $this->getAclManager()->get($this->getUser(), $permission);
}
public function checkReadOnlyTeam($scope)
{
if (isset($this->data['table'][$scope]) && isset($this->data['table'][$scope]['read'])) {
return $this->data['table'][$scope]['read'] === 'team';
}
return false;
return $this->getAclManager()->checkReadOnlyTeam($this->getUser(), $scope);
}
public function checkReadOnlyOwn($scope)
{
if ($this->user->isAdmin()) {
return false;
}
if (isset($this->data['table'][$scope]) && isset($this->data['table'][$scope]['read'])) {
return $this->data['table'][$scope]['read'] === 'own';
}
return false;
return $this->getAclManager()->checkReadOnlyOwn($this->getUser(), $scope);
}
public function checkIsOwner($entity)
public function check($subject, $action = null, $isOwner = null, $inTeam = null)
{
if ($this->user->isAdmin()) {
return false;
}
$userId = $this->user->id;
if ($userId === $entity->get('assignedUserId') || $userId === $entity->get('createdById')) {
return true;
}
return false;
return $this->getAclManager()->check($this->getUser(), $subject, $action, $isOwner, $inTeam) ;
}
public function checkInTeam($entity)
public function checkScope($scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
{
$userTeamIds = $this->user->get('teamsIds');
if (!$entity->hasRelation('teams') || !$entity->hasField('teamsIds')) {
return false;
}
if (!$entity->has('teamsIds')) {
$entity->loadLinkMultipleField('teams');
}
$teamIds = $entity->get('teamsIds');
if (empty($teamIds)) {
return false;
}
foreach ($userTeamIds as $id) {
if (in_array($id, $teamIds)) {
return true;
}
}
return false;
}
private function load()
{
$aclTables = [];
$assignmentPermissionList = [];
$userRoles = $this->user->get('roles');
foreach ($userRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
}
$teams = $this->user->get('teams');
foreach ($teams as $team) {
$teamRoles = $team->get('roles');
foreach ($teamRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
}
}
$this->data['table'] = $this->merge($aclTables);
$this->data['assignmentPermission'] = $this->mergeValues($assignmentPermissionList, 'all');
}
private function initSolid()
{
if (!$this->metadata) {
return;
}
$data = $this->metadata->get('app.acl.solid', array());
foreach ($data as $entityName => $item) {
$this->data['table'][$entityName] = $item;
}
}
private function mergeValues(array $list, $defaultValue)
{
$result = null;
foreach ($list as $level) {
if ($level != 'not-set') {
if (is_null($result)) {
$result = $level;
continue;
}
if (array_search($result, $this->levelList) > array_search($level, $this->levelList)) {
$result = $level;
}
}
}
if (is_null($result)) {
$result = $defaultValue;
}
return $result;
}
private function merge($tables)
{
$data = array();
foreach ($tables as $table) {
foreach ($table as $scope => $row) {
if ($row == false) {
if (!isset($data[$scope])) {
$data[$scope] = false;
}
} else {
if (!isset($data[$scope])) {
$data[$scope] = array();
}
if ($data[$scope] == false) {
$data[$scope] = array();
}
foreach ($row as $action => $level) {
if (!isset($data[$scope][$action])) {
$data[$scope][$action] = $level;
} else {
if (array_search($data[$scope][$action], $this->levelList) > array_search($level, $this->levelList)) {
$data[$scope][$action] = $level;
}
}
}
}
}
}
return $data;
}
private function buildCache()
{
$contents = '<' . '?'. 'php return ' . var_export($this->data, true) . ';';
$this->fileManager->putContents($this->cacheFile, $contents);
return $this->getAclManager()->checkScope($this->getUser(), $subject, $action, $isOwner, $inTeam, $entity) ;
}
}

View File

@@ -0,0 +1,223 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Acl;
use \Espo\Core\Interfaces\Injectable;
use \Espo\Entities\User;
use \Espo\ORM\Entity;
class Base implements Injectable
{
protected $dependencies = array(
'config',
'entityManager',
'aclManager'
);
protected $injections = array();
public function inject($name, $object)
{
$this->injections[$name] = $object;
}
public function __construct()
{
$this->init();
}
protected function init()
{
}
protected function getInjection($name)
{
return $this->injections[$name];
}
protected function addDependency($name)
{
$this->dependencies[] = $name;
}
public function getDependencyList()
{
return $this->dependencies;
}
protected function getConfig()
{
return $this->getInjection('config');
}
protected function getEntityManager()
{
return $this->getInjection('entityManager');
}
protected function getAclManager()
{
return $this->getInjection('aclManager');
}
public function checkReadOnlyTeam(User $user, $scope, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
return false;
}
return $data['read'] === 'team';
}
public function checkReadOnlyOwn(User $user, $scope, $data)
{
if (empty($data) || !is_array($data) || !isset($data['read'])) {
return false;
}
return $data['read'] === 'own';
}
public function checkEntity(User $user, Entity $entity, $data, $action)
{
return $this->checkScope($user, $data, $entity->getEntityType(), $action, null, null, $entity);
}
public function checkScope(User $user, $data, $scope, $action = null, $isOwner = null, $inTeam = null, Entity $entity = null)
{
if (is_null($data)) {
return true;
}
if ($data === false) {
return false;
}
if ($data === true) {
return true;
}
if (!is_null($action)) {
if (array_key_exists($action, $data)) {
$value = $data[$action];
if ($value === 'all' || $value === true) {
return true;
}
if (!$value || $value === 'no') {
return false;
}
if (is_null($isOwner)) {
if ($entity) {
$isOwner = $this->checkIsOwner($user, $entity);
} else {
return true;
}
}
if ($isOwner) {
if ($value === 'own' || $value === 'team') {
return true;
}
}
if (is_null($inTeam) && $entity) {
$inTeam = $this->checkInTeam($user, $entity);
}
if ($inTeam) {
if ($value === 'team') {
return true;
}
}
return false;
}
}
return true;
}
public function checkIsOwner(User $user, Entity $entity)
{
if ($entity->has('assignedUserId')) {
if ($user->id === $entity->get('assignedUserId')) {
return true;
}
}
if ($entity->has('createdById')) {
if ($user->id === $entity->get('createdById')) {
return true;
}
}
return false;
}
public function checkInTeam(User $user, Entity $entity)
{
$userTeamIds = $user->get('teamsIds');
if (!$entity->hasRelation('teams') || !$entity->hasField('teamsIds')) {
return false;
}
if (!$entity->has('teamsIds')) {
$entity->loadLinkMultipleField('teams');
}
$teamIds = $entity->get('teamsIds');
if (empty($teamIds)) {
return false;
}
foreach ($userTeamIds as $id) {
if (in_array($id, $teamIds)) {
return true;
}
}
return false;
}
public function checkEntityDelete(User $user, Entity $entity, $data)
{
$result = $this->checkEntity($user, $entity, $data, 'delete');
if (!$result) {
if (is_array($data)) {
if ($data['edit'] != 'no') {
if ($entity->has('createdById') && $entity->get('createdById') == $user->id) {
if (!$entity->has('assignedUserId')) {
return true;
} else {
if (!$entity->get('assignedUserId')) {
return true;
}
if ($entity->get('assignedUserId') == $entity->get('createdById')) {
return true;
}
}
}
}
}
}
return $result;
}
}

View File

@@ -0,0 +1,239 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Acl;
use \Espo\Core\Exceptions\Error;
use \Espo\ORM\Entity;
class Table
{
private $data = array(
'table' => array()
);
private $cacheFile;
private $actionList = array('read', 'edit', 'delete');
private $levelList = array('all', 'team', 'own', 'no');
protected $fileManager;
protected $metadata;
public function __construct(\Espo\Entities\User $user, $config = null, $fileManager = null, $metadata = null)
{
$this->user = $user;
$this->metadata = $metadata;
if (!$this->user->isFetched()) {
throw new Error();
}
$this->user->loadLinkMultipleField('teams');
if ($fileManager) {
$this->fileManager = $fileManager;
}
$this->cacheFile = 'data/cache/application/acl/' . $user->id . '.php';
if ($config && $config->get('useCache') && file_exists($this->cacheFile)) {
$cached = include $this->cacheFile;
$this->data = $cached;
$this->initSolid();
} else {
$this->load();
$this->initSolid();
if ($config && $fileManager && $config->get('useCache')) {
$this->buildCache();
}
}
}
public function getMap()
{
return $this->data;
}
public function getScopeData($scope)
{
if (array_key_exists($scope, $this->data['table'])) {
return $this->data['table'][$scope];
}
return null;
}
public function get($permission)
{
if ($permission == 'table') {
return null;
}
if (array_key_exists($permission, $this->data)) {
return $this->data[$permission];
}
return null;
}
public function getLevel($scope, $action)
{
if (array_key_exists($scope, $this->data['table'])) {
if (array_key_exists($action, $this->data['table'][$scope])) {
return $this->data['table'][$scope][$action];
}
}
return false;
}
private function load()
{
$aclTables = [];
$assignmentPermissionList = [];
$userRoles = $this->user->get('roles');
foreach ($userRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
}
$teams = $this->user->get('teams');
foreach ($teams as $team) {
$teamRoles = $team->get('roles');
foreach ($teamRoles as $role) {
$aclTables[] = $role->get('data');
$assignmentPermissionList[] = $role->get('assignmentPermission');
}
}
$this->data['table'] = $this->merge($aclTables);
$this->data['assignmentPermission'] = $this->mergeValues($assignmentPermissionList, 'all');
}
private function initSolid()
{
if (!$this->metadata) {
return;
}
$data = $this->metadata->get('app.acl.solid', array());
foreach ($data as $entityType => $item) {
$this->data['table'][$entityType] = $item;
}
}
private function mergeValues(array $list, $defaultValue)
{
$result = null;
foreach ($list as $level) {
if ($level != 'not-set') {
if (is_null($result)) {
$result = $level;
continue;
}
if (array_search($result, $this->levelList) > array_search($level, $this->levelList)) {
$result = $level;
}
}
}
if (is_null($result)) {
$result = $defaultValue;
}
return $result;
}
private function getScopeList()
{
$scopeList = [];
$scopes = $this->metadata->get('scopes');
foreach ($scopes as $scope => $d) {
if (!empty($d['acl'])) {
$scopeList[] = $scope;
}
}
return $scopeList;
}
private function merge($tables)
{
$data = array();
$scopeList = $this->getScopeList();
foreach ($tables as $table) {
foreach ($scopeList as $scope) {
if (!isset($table->$scope)) {
continue;
}
$row = $table->$scope;
if ($row == false) {
if (!isset($data[$scope])) {
$data[$scope] = false;
}
} else if ($row === true) {
$data[$scope] = true;
} else {
if (!isset($data[$scope])) {
$data[$scope] = array();
}
if ($data[$scope] == false) {
$data[$scope] = array();
}
if (is_array($row) || $row instanceof \stdClass) {
foreach ($row as $action => $level) {
if (!isset($data[$scope][$action])) {
$data[$scope][$action] = $level;
} else {
if (array_search($data[$scope][$action], $this->levelList) > array_search($level, $this->levelList)) {
$data[$scope][$action] = $level;
}
}
}
}
}
}
}
foreach ($scopeList as $scope) {
if (!array_key_exists($scope, $data)) {
$aclType = $this->metadata->get('scopes.' . $scope . '.acl');
if (!empty($aclType) && ($aclType === true || $aclType === 'record')) {
$data[$scope] = $this->metadata->get('app.acl.recordDefault');
}
}
}
return $data;
}
private function buildCache()
{
$contents = '<' . '?'. 'php return ' . var_export($this->data, true) . ';';
$this->fileManager->putContents($this->cacheFile, $contents);
}
}

View File

@@ -0,0 +1,181 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core;
use \Espo\Core\Exceptions\Error;
use \Espo\ORM\Entity;
use \Espo\Entities\User;
use \Espo\Core\Utils\Util;
class AclManager
{
private $container;
private $metadata;
private $implementationHashMap = array();
private $tableHashMap = array();
public function __construct(Container $container)
{
$this->container = $container;
$this->metadata = $container->get('metadata');
}
protected function getContainer()
{
return $this->container;
}
public function getImplementation($scope)
{
if (empty($this->implementationHashMap[$scope])) {
$normalizedName = Util::normilizeClassName($scope);
$className = '\\Espo\\Custom\\Acl\\' . $normalizedName;
if (!class_exists($className)) {
$moduleName = $this->metadata->getScopeModuleName($scope);
if ($moduleName) {
$className = '\\Espo\\Modules\\' . $moduleName . '\\Acl\\' . $normalizedName;
} else {
$className = '\\Espo\\Acl\\' . $normalizedName;
}
if (!class_exists($className)) {
$className = '\\Espo\\Core\\Acl\\Base';
}
}
if (class_exists($className)) {
$acl = new $className();
$dependencies = $acl->getDependencyList();
foreach ($dependencies as $name) {
$acl->inject($name, $this->container->get($name));
}
$this->implementationHashMap[$scope] = $acl;
} else {
throw new Error();
}
}
return $this->implementationHashMap[$scope];
}
protected function getTable(User $user)
{
$key = spl_object_hash($user);
if (empty($this->tableHashMap[$key])) {
$config = $this->getContainer()->get('config');
$fileManager = $this->getContainer()->get('fileManager');
$metadata = $this->getContainer()->get('metadata');
$this->tableHashMap[$key] = new \Espo\Core\Acl\Table($user, $config, $fileManager, $metadata);
}
return $this->tableHashMap[$key];
}
public function getMap(User $user)
{
return $this->getTable($user)->getMap();
}
public function getLevel(User $user, $scope, $action)
{
if ($user->isAdmin()) {
return 'all';
}
return $this->getTable($user)->getLevel($scope, $action);
}
public function get(User $user, $permission)
{
if ($user->isAdmin()) {
return true;
}
$this->getTable($user)->get($permission);
}
public function checkReadOnlyTeam(User $user, $scope)
{
if ($user->isAdmin()) {
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyTeam($user, $scope, $data);
}
public function checkReadOnlyOwn(User $user, $scope)
{
if ($user->isAdmin()) {
return false;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkReadOnlyOwn($user, $scope, $data);
}
public function check(User $user, $subject, $action = null, $isOwner = null, $inTeam = null)
{
if ($user->isAdmin()) {
return true;
}
if (is_string($subject)) {
return $this->checkScope($user, $subject, $action, $isOwner, $inTeam);
} else {
$entity = $subject;
if ($entity instanceof Entity) {
$entityType = $entity->getEntityType();
$impl = $this->getImplementation($entityType);
$methodName = 'checkEntity' . ucfirst($action);
if (method_exists($impl, $methodName)) {
$data = $this->getTable($user)->getScopeData($entityType);
return $impl->$methodName($user, $entity, $data);
}
return $this->checkEntity($user, $entity, $action);
}
}
}
public function checkEntity(User $user, Entity $entity, $action)
{
if ($user->isAdmin()) {
return true;
}
$data = $this->getTable($user)->getScopeData($entity->getEntityType());
return $this->getImplementation($scope)->checkEntity($user, $entity, $data, $action);
}
public function checkScope(User $user, $scope, $action = null, $isOwner = null, $inTeam = null, $entity = null)
{
if ($user->isAdmin()) {
return true;
}
$data = $this->getTable($user)->getScopeData($scope);
return $this->getImplementation($scope)->checkScope($user, $data, $scope, $action, $isOwner, $inTeam, $entity);
}
}

View File

@@ -194,14 +194,20 @@ class Container
);
}
private function loadAclManager()
{
$className = $this->getServiceClassName('acl', '\\Espo\\Core\\AclManager');
return new $className(
$this->get('container')
);
}
private function loadAcl()
{
$className = $this->getServiceClassName('acl', '\\Espo\\Core\\Acl');
return new $className(
$this->get('user'),
$this->get('config'),
$this->get('fileManager'),
$this->get('metadata')
$this->get('aclManager'),
$this->get('user')
);
}

View File

@@ -90,6 +90,11 @@ abstract class Base
return $this->container->get('acl');
}
protected function getAclManager()
{
return $this->container->get('aclManager');
}
protected function getConfig()
{
return $this->container->get('config');

View File

@@ -34,6 +34,8 @@ class Record extends Base
public static $defaultAction = 'list';
protected $defaultRecordServiceName = 'Record';
protected function getEntityManager()
{
return $this->getContainer()->get('entityManager');
@@ -48,7 +50,7 @@ class Record extends Base
if ($this->getServiceFactory()->checkExists($name)) {
$service = $this->getServiceFactory()->create($name);
} else {
$service = $this->getServiceFactory()->create('Record');
$service = $this->getServiceFactory()->create($this->defaultRecordServiceName);
$service->setEntityName($name);
}

View File

@@ -0,0 +1,57 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Controllers;
use \Espo\Core\Exceptions\Error;
use \Espo\Core\Exceptions\Forbidden;
use \Espo\Core\Exceptions\NotFound;
use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Utils\Util;
class RecordTree extends Record
{
public static $defaultAction = 'list';
protected $defaultRecordServiceName = 'RecordTree';
public function actionListTree($params, $data, $request)
{
if (!$this->getAcl()->check($this->name, 'read')) {
throw new Forbidden();
}
$where = $request->get('where');
$parentId = $request->get('parentId');
$maxDepth = $request->get('maxDepth');
$collection = $this->getRecordService()->getTree($parentId, array(
'where' => $where
), 0, $maxDepth);
return array(
'list' => $collection->toArray(),
'path' => $this->getRecordService()->getTreeItemPath($parentId)
);
}
}

View File

@@ -0,0 +1,43 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Entities;
class CategoryTreeItem extends \Espo\Core\ORM\Entity
{
public function toArray()
{
$data = parent::toArray();
$childList = $this->get('childList');
if (is_null($childList)) {
$data['childList'] = null;
} else {
$arr = [];
foreach ($childList as $entity) {
$arr[] = $entity->toArray();
}
$data['childList'] = $arr;
}
return $data;
}
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Core\EntryPoints;
@@ -29,50 +29,50 @@ use \Espo\Core\Exceptions\Forbidden;
abstract class Base
{
private $container;
public static $authRequired = true;
protected function getContainer()
{
return $this->container;
}
protected function getUser()
{
return $this->getContainer()->get('user');
}
protected function getAcl()
{
return $this->getContainer()->get('acl');
}
protected function getEntityManager()
{
return $this->getContainer()->get('entityManager');
}
protected function getServiceFactory()
{
return $this->getContainer()->get('serviceFactory');
}
}
protected function getConfig()
{
return $this->getContainer()->get('config');
}
protected function getMetadata()
{
return $this->getContainer()->get('metadata');
}
}
public function __construct(Container $container)
{
$this->container = $container;
}
abstract public function run();
abstract public function run();
}

View File

@@ -95,7 +95,12 @@ class Importer
}
if ($duplicate = $this->findDuplicate($email)) {
$this->getEntityManager()->getRepository('Email')->relate($duplicate, 'users', $userId);
$duplicate->loadLinkMultipleField('users');
$usersIds = $duplicate->get('usersIds');
$usersIds[] = $userId;
$duplicate->set('usersIds', $usersIds);
$this->getEntityManager()->saveEntity($duplicate);
if (!empty($teamsIds)) {
foreach ($teamsIds as $teamId) {
$this->getEntityManager()->getRepository('Email')->relate($duplicate, 'teams', $teamId);

View File

@@ -284,11 +284,18 @@ class Sender
$message->setBody($body);
if (!$message->getHeaders()->has('content-type')) {
$contentTypeHeader = new \Zend\Mail\Header\ContentType();
$message->getHeaders()->addHeader($contentTypeHeader);
if ($messageType == 'text/plain') {
if ($message->getHeaders()->has('content-type')) {
$message->getHeaders()->removeHeader('content-type');
}
$message->getHeaders()->addHeaderLine('Content-Type', 'text/plain; charset=UTF-8');
} else {
if (!$message->getHeaders()->has('content-type')) {
$contentTypeHeader = new \Zend\Mail\Header\ContentType();
$message->getHeaders()->addHeader($contentTypeHeader);
}
$message->getHeaders()->get('content-type')->setType($messageType);
}
$message->getHeaders()->get('content-type')->setType($messageType);
$message->setEncoding('UTF-8');

View File

@@ -0,0 +1,95 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Repositories;
use \Espo\Core\Entities\CategoryTreeItem as Entity;
class CategoryTree extends \Espo\Core\ORM\Repositories\RDB
{
public function afterSave(Entity $entity, $options)
{
parent::afterSave($entity, $options);
$pdo = $this->getEntityManager()->getPDO();
$query = $this->getEntityManager()->getQuery();
$parentId = $entity->get('parentId');
$pathsTableName = $query->toDb($entity->getEntityType() . 'Path');
if ($entity->isNew()) {
if ($parentId) {
$sql = "
INSERT INTO `".$pathsTableName."` (ascendor_id, descendor_id)
SELECT ascendor_id, ".$pdo->quote($entity->id)."
FROM `".$pathsTableName."`
WHERE descendor_id = ".$pdo->quote($parentId)."
UNION ALL
SELECT ".$pdo->quote($entity->id).", ".$pdo->quote($entity->id)."
";
} else {
$sql = "
INSERT INTO `".$pathsTableName."` (ascendor_id, descendor_id)
VALUES
(".$pdo->quote($entity->id).", ".$pdo->quote($entity->id).")
";
}
$pdo->query($sql);
} else {
if ($entity->isFieldChanged('parentId')) {
$sql = "
DELETE a FROM `".$pathsTableName."` AS a
JOIN `".$pathsTableName."` AS d ON a.descendor_id = d.descendor_id
LEFT JOIN `".$pathsTableName."` AS x ON x.ascendor_id = d.ascendor_id AND x.descendor_id = a.ascendor_id
WHERE d.ascendor_id = ".$pdo->quote($entity->id)." AND x.ascendor_id IS NULL
";
$pdo->query($sql);
if (!empty($parentId)) {
$sql = "
INSERT INTO `".$pathsTableName."` (ascendor_id, descendor_id)
SELECT supertree.ascendor_id, subtree.descendor_id
FROM `".$pathsTableName."` AS supertree
JOIN `".$pathsTableName."` AS subtree
WHERE
subtree.ascendor_id = ".$pdo->quote($entity->id)." AND
supertree.descendor_id = ".$pdo->quote($parentId)."
";
$pdo->query($sql);
}
}
}
}
public function afterRemove(Entity $entity, $options)
{
parent::afterRemove($entity, $options);
$pdo = $this->getEntityManager()->getPDO();
$query = $this->getEntityManager()->getQuery();
$pathsTableName = $query->toDb($entity->getEntityType() . 'Path');
$sql = "DELETE FROM `".$pathsTableName."` WHERE descendor_id = ".$pdo->quote($entity->id)."";
$pdo->query($sql);
}
}

View File

@@ -44,13 +44,13 @@ class SelectManagerFactory
$this->metadata = $metadata;
}
public function create($entityName)
public function create($entityType)
{
$normalizedName = Util::normilizeClassName($entityName);
$normalizedName = Util::normilizeClassName($entityType);
$className = '\\Espo\\Custom\\SelectManagers\\' . $normalizedName;
if (!class_exists($className)) {
$moduleName = $this->metadata->getScopeModuleName($entityName);
$moduleName = $this->metadata->getScopeModuleName($entityType);
if ($moduleName) {
$className = '\\Espo\\Modules\\' . $moduleName . '\\SelectManagers\\' . $normalizedName;
} else {
@@ -62,7 +62,7 @@ class SelectManagerFactory
}
$selectManager = new $className($this->entityManager, $this->user, $this->acl, $this->metadata);
$selectManager->setEntityName($entityName);
$selectManager->setEntityType($entityType);
return $selectManager;
}

View File

@@ -36,7 +36,7 @@ class Base
protected $entityManager;
protected $entityName;
protected $entityType;
protected $metadata;
@@ -65,9 +65,14 @@ class Base
return $this->user;
}
public function setEntityName($entityName)
public function setEntityType($entityType)
{
$this->entityName = $entityName;
$this->entityType = $entityType;
}
protected function getEntityType()
{
return $this->entityType;
}
protected function limit($params, &$result)
@@ -84,7 +89,7 @@ class Base
{
if (!empty($params['sortBy'])) {
$result['orderBy'] = $params['sortBy'];
$type = $this->metadata->get("entityDefs.{$this->entityName}.fields." . $result['orderBy'] . ".type");
$type = $this->metadata->get("entityDefs.{$this->entityType}.fields." . $result['orderBy'] . ".type");
if ($type == 'link') {
$result['orderBy'] .= 'Name';
} else if ($type == 'linkParent') {
@@ -102,13 +107,13 @@ class Base
protected function getTextFilterFields()
{
return $this->metadata->get("entityDefs.{$this->entityName}.collection.textFilterFields", array('name'));
return $this->metadata->get("entityDefs.{$this->entityType}.collection.textFilterFields", array('name'));
}
protected function getSeed()
{
if (empty($this->seed)) {
$this->seed = $this->entityManager->getEntity($this->entityName);
$this->seed = $this->entityManager->getEntity($this->entityType);
}
return $this->seed;
}
@@ -159,7 +164,9 @@ class Base
}
$linkedWith = array();
$ignoreList = array('linkedWith', 'bool', 'primary');
$inCategory = array();
$ignoreList = ['linkedWith', 'inCategory', 'bool', 'primary'];
foreach ($params['where'] as $item) {
if (!in_array($item['type'], $ignoreList)) {
$part = $this->getWherePart($item);
@@ -169,51 +176,117 @@ class Base
} else {
if ($item['type'] == 'linkedWith' && !empty($item['value'])) {
$linkedWith[$item['field']] = $item['value'];
} else if ($item['type'] == 'inCategory' && !empty($item['value'])) {
$inCategory[$item['field']] = $item['value'];
}
}
}
if (!empty($linkedWith)) {
$joins = array();
$part = array();
foreach ($linkedWith as $link => $idsValue) {
if (is_array($idsValue) && count($idsValue) == 1) {
$idsValue = $idsValue[0];
}
$relDefs = $this->getSeed()->getRelations();
if (!empty($relDefs[$link])) {
$defs = $relDefs[$link];
if ($defs['type'] == 'manyMany') {
$joins[] = $link;
if (!empty($defs['relationName']) && !empty($defs['midKeys'])) {
$key = $defs['midKeys'][1];
$relationName = lcfirst($defs['relationName']);
$part[$relationName . '.' . $key] = $idsValue;
}
} else if ($defs['type'] == 'belongsTo') {
if (!empty($defs['type']['key'])) {
$key = $defs['type']['key'];
$part[$key] = $idsValue;
}
}
}
}
if (!empty($part)) {
$where[] = $part;
}
$result['joins'] = $joins;
$result['distinct'] = true;
}
$result['whereClause'] = array_merge($result['whereClause'], $where);
if (!empty($linkedWith)) {
$this->handleLinkedWith($linkedWith, $result);
}
if (!empty($inCategory)) {
$this->handleInCategory($inCategory, $result);
}
}
}
protected function handleLinkedWith($linkedWith, &$result)
{
$joins = [];
$part = array();
foreach ($linkedWith as $link => $idsValue) {
if (is_array($idsValue) && count($idsValue) == 1) {
$idsValue = $idsValue[0];
}
$relDefs = $this->getSeed()->getRelations();
if (!empty($relDefs[$link])) {
$defs = $relDefs[$link];
if ($defs['type'] == 'manyMany') {
$joins[] = $link;
if (!empty($defs['relationName']) && !empty($defs['midKeys'])) {
$key = $defs['midKeys'][1];
$relationName = lcfirst($defs['relationName']);
$part[$relationName . '.' . $key] = $idsValue;
}
} else if ($defs['type'] == 'belongsTo') {
if (!empty($defs['key'])) {
$key = $defs['key'];
$part[$key] = $idsValue;
}
}
}
}
if (!empty($part)) {
$result['whereClause'][] = $part;
}
$result['joins'] = array_merge($result['joins'], $joins);
$result['distinct'] = true;
}
protected function handleInCategory($inCategory, &$result)
{
$joins = [];
$part = array();
$query = $this->getEntityManager()->getQuery();
$tableName = $query->toDb($this->getSeed()->getEntityType());
foreach ($inCategory as $link => $val) {
$relDefs = $this->getSeed()->getRelations();
if (!empty($relDefs[$link])) {
$defs = $relDefs[$link];
$foreignEntity = $defs['entity'];
if (empty($foreignEntity)) {
continue;
}
$pathName = lcfirst($query->sanitize($foreignEntity . 'Path'));
if ($defs['type'] == 'manyMany') {
if (!empty($defs['relationName']) && !empty($defs['midKeys'])) {
$result['distinct'] = true;
$result['joins'][] = $link;
$key = $defs['midKeys'][1];
$relationName = lcfirst($defs['relationName']);
$result['customJoin'] .= "
JOIN " . $query->toDb($pathName) . " AS `{$pathName}` ON {$pathName}.descendor_id = ".$query->sanitize($relationName) . "." . $query->toDb($key) . "
";
$part[$pathName . '.ascendorId'] = $val;
}
} else if ($defs['type'] == 'belongsTo') {
if (!empty($defs['key'])) {
$key = $defs['key'];
$result['customJoin'] .= "
JOIN " . $query->toDb($pathName) . " AS `{$pathName}` ON {$pathName}.descendor_id = {$tableName}." . $query->toDb($key) . "
";
$part[$pathName . '.ascendorId'] = $val;
}
}
}
}
if (!empty($part)) {
$result['whereClause'][] = $part;
}
}
protected function q($params, &$result)
{
if (!empty($params['q'])) {
@@ -243,10 +316,10 @@ class Base
protected function access(&$result)
{
if ($this->acl->checkReadOnlyOwn($this->entityName)) {
if ($this->acl->checkReadOnlyOwn($this->entityType)) {
$this->accessOnlyOwn($result);
}
if (!$this->user->isAdmin() && $this->acl->checkReadOnlyTeam($this->entityName)) {
if (!$this->user->isAdmin() && $this->acl->checkReadOnlyTeam($this->entityType)) {
$this->accessOnlyTeam($result);
}
}
@@ -288,9 +361,10 @@ class Base
public function getSelectParams(array $params, $withAcl = false)
{
$result = array(
'joins' => array(),
'leftJoins' => array(),
'whereClause' => array()
'joins' => [],
'leftJoins' => [],
'whereClause' => [],
'customJoin' => ''
);
$this->order($params, $result);
@@ -444,6 +518,12 @@ class Base
case 'on':
$part[$item['field'] . '='] = $item['value'];
break;
case 'startsWith':
$part[$item['field'] . '*'] = $item['value'] . '%';
break;
case 'contains':
$part[$item['field'] . '*'] = '%' . $item['value'] . '%';
break;
case 'notEquals':
case 'notOn':
$part[$item['field'] . '!='] = $item['value'];
@@ -468,6 +548,12 @@ class Base
case 'notIn':
$part[$item['field'] . '!='] = $item['value'];
break;
case 'isNull':
$part[$item['field'] . '='] = null;
break;
case 'isNotNull':
$part[$item['field'] . '!='] = null;
break;
case 'isTrue':
$part[$item['field'] . '='] = true;
break;
@@ -578,5 +664,21 @@ class Base
'assignedUserId' => $this->getUser()->id
);
}
protected function filterFollowed(&$result)
{
$query = $this->getEntityManager()->getQuery();
$result['customJoin'] .= "
JOIN subscription ON
subscription.entity_type = ".$query->quote($this->getEntityType())." AND
subscription.entity_id = ".$query->toDb($this->getEntityType()).".id AND
subscription.user_id = ".$query->quote($this->getUser()->id)."
";
}
protected function boolFilterFollowed(&$result)
{
$this->filterFollowed($result);
}
}

View File

@@ -0,0 +1,30 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Templates\Controllers;
class CategoryTree extends \Espo\Core\Controllers\RecordTree
{
}

View File

@@ -0,0 +1,29 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Templates\Entities;
class CategoryTree extends \Espo\Core\Entities\CategoryTreeItem
{
}

View File

@@ -0,0 +1,21 @@
[
{
"label": "Overview",
"rows": [
[
{
"name": "name"
},
{
"name": "order"
}
],
[
false,
{
"name": "parent"
}
]
]
}
]

View File

@@ -0,0 +1,22 @@
[
{
"label": "",
"rows": [
[
{
"name": "name"
}
],
[
{
"name": "order"
}
],
[
{
"name": "parent"
}
]
]
}
]

View File

@@ -0,0 +1,3 @@
[
"parent"
]

View File

@@ -0,0 +1,14 @@
[
{
"name": "name",
"width": 40,
"link": true
},
{
"name": "order",
"width": 15
},
{
"name": "parent"
}
]

View File

@@ -0,0 +1,14 @@
[
{
"name": "name",
"width": 40,
"link": true
},
{
"name": "order",
"width": 15
},
{
"name": "parent"
}
]

View File

@@ -0,0 +1,3 @@
[
]

View File

@@ -0,0 +1,3 @@
[
"children"
]

View File

@@ -0,0 +1,26 @@
{
"controller": "Controllers.RecordTree",
"collection": "Collections.Tree",
"menu": {
"listTree": {
"buttons": [
{
"label": "List View",
"link": "#{entityType}/list",
"acl": "read",
"style": "default"
}
]
},
"list": {
"buttons": [
{
"label": "Tree View",
"link": "#{entityType}",
"acl": "read",
"style": "default"
}
]
}
}
}

View File

@@ -0,0 +1,106 @@
{
"fields": {
"name": {
"type": "varchar",
"required": true
},
"order": {
"type": "int",
"required": true,
"default": 1
},
"description": {
"type": "text"
},
"createdAt": {
"type": "datetime",
"readOnly": true
},
"modifiedAt": {
"type": "datetime",
"readOnly": true
},
"createdBy": {
"type": "link",
"readOnly": true
},
"modifiedBy": {
"type": "link",
"readOnly": true
},
"teams": {
"type": "linkMultiple"
},
"parent": {
"type": "link"
},
"childList": {
"type": "jsonArray",
"notStorable": true,
"disabled": true
}
},
"links": {
"createdBy": {
"type": "belongsTo",
"entity": "User"
},
"modifiedBy": {
"type": "belongsTo",
"entity": "User"
},
"teams": {
"type": "hasMany",
"entity": "Team",
"relationName": "EntityTeam",
"layoutRelationshipsDisabled": true
},
"parent": {
"type": "belongsTo",
"foreign": "children",
"entity": "{entityType}",
"isCustom": true
},
"children": {
"type": "hasMany",
"foreign": "parent",
"entity": "{entityType}",
"isCustom": true
}
},
"collection": {
"sortBy": "parent",
"asc": true
},
"indexes": {
"name": {
"columns": [
"name",
"deleted"
]
}
},
"additionalTables": {
"{entityType}Path": {
"fields": {
"id": {
"type": "id",
"dbType": "int",
"len": "11",
"autoincrement": true,
"unique" : true
},
"ascendorId": {
"type": "varchar",
"len": "100",
"index": true
},
"descendorId": {
"type": "varchar",
"len": "24",
"index": true
}
}
}
}
}

View File

@@ -0,0 +1,30 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Templates\Repositories;
class CategoryTree extends \Espo\Core\Repositories\CategoryTree
{
}

View File

@@ -0,0 +1,30 @@
<?php
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2015 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/.
************************************************************************/
namespace Espo\Core\Templates\Services;
class CategoryTree extends \Espo\Services\RecordTree
{
}

View File

@@ -27,13 +27,6 @@ use Espo\Core\Utils\Util;
class Install extends \Espo\Core\Upgrades\Actions\Base
{
/**
* Is copied extension files to Espo
*
* @var [type]
*/
protected $isCopied = null;
/**
* Main installation process
*
@@ -54,8 +47,6 @@ class Install extends \Espo\Core\Upgrades\Actions\Base
$this->initialize();
$this->isCopied = false;
/** check if an archive is unzipped, if no then unzip */
$packagePath = $this->getPackagePath();
if (!file_exists($packagePath)) {
@@ -77,7 +68,6 @@ class Install extends \Espo\Core\Upgrades\Actions\Base
if (!$this->copyFiles()) {
$this->throwErrorAndRemovePackage('Cannot copy files.');
}
$this->isCopied = true;
/* remove files defined in a manifest */
$this->deleteFiles(true);
@@ -103,10 +93,6 @@ class Install extends \Espo\Core\Upgrades\Actions\Base
protected function restoreFiles()
{
if (!$this->isCopied) {
return;
}
$GLOBALS['log']->info('Installer: Restore previous files.');
$backupPath = $this->getPath('backupPath');

View File

@@ -160,7 +160,7 @@ class Install extends \Espo\Core\Upgrades\Actions\Base\Install
$extensionEntity = $this->getExtensionEntity();
if (isset($extensionEntity)) {
$comparedVersion = version_compare($manifest['version'], $extensionEntity->get('version'));
$comparedVersion = version_compare($manifest['version'], $extensionEntity->get('version'), '>=');
if ($comparedVersion <= 0) {
$this->throwErrorAndRemovePackage('You cannot install an older version of this extension.');
}

View File

@@ -33,10 +33,14 @@ class Job
private $entityManager;
private $cronScheduledJob;
public function __construct(Config $config, EntityManager $entityManager)
{
$this->config = $config;
$this->entityManager = $entityManager;
$this->cronScheduledJob = new ScheduledJob($this->config, $this->entityManager);
}
protected function getConfig()
@@ -49,6 +53,11 @@ class Job
return $this->entityManager;
}
protected function getCronScheduledJob()
{
return $this->cronScheduledJob;
}
/**
* Get Pending Jobs
*
@@ -145,13 +154,30 @@ class Job
$currentTime = time();
$periodTime = $currentTime - intval($jobConfigs['jobPeriod']);
$update = "UPDATE job SET `status` = '" . CronManager::FAILED ."' WHERE
$pdo = $this->getEntityManager()->getPDO();
$select = "SELECT id, scheduled_job_id, execute_time FROM `job` WHERE
(`status` = '" . CronManager::RUNNING ."')
AND execute_time < '".date('Y-m-d H:i:s', $periodTime)."' ";
$sth = $pdo->prepare($select);
$sth->execute();
$pdo = $this->getEntityManager()->getPDO();
$jobData = array();
while ($row = $sth->fetch(PDO::FETCH_ASSOC)){
$jobData[$row['id']] = $row;
}
$update = "UPDATE job SET `status` = '". CronManager::FAILED ."' WHERE id IN ('".implode("', '", array_keys($jobData))."')";
$sth = $pdo->prepare($update);
$sth->execute();
//add status 'Failed' to SchediledJobLog
$cronScheduledJob = $this->getCronScheduledJob();
foreach ($jobData as $jobId => $job) {
if (!empty($job['scheduled_job_id'])) {
$cronScheduledJob->addLogRecord($job['scheduled_job_id'], CronManager::FAILED, $job['execute_time']);
}
}
}
/**

View File

@@ -81,14 +81,16 @@ class ScheduledJob
*
* @return string ID of created ScheduledJobLogRecord
*/
public function addLogRecord($scheduledJobId, $status)
public function addLogRecord($scheduledJobId, $status, $runTime = null)
{
$lastRun = date('Y-m-d H:i:s');
if (!isset($runTime)) {
$runTime = date('Y-m-d H:i:s');
}
$entityManager = $this->getEntityManager();
$scheduledJob = $entityManager->getEntity('ScheduledJob', $scheduledJobId);
$scheduledJob->set('lastRun', $lastRun);
$scheduledJob->set('lastRun', $runTime);
$entityManager->saveEntity($scheduledJob);
$scheduledJobLog = $entityManager->getEntity('ScheduledJobLogRecord');
@@ -96,7 +98,7 @@ class ScheduledJob
'scheduledJobId' => $scheduledJobId,
'name' => $scheduledJob->get('name'),
'status' => $status,
'executionTime' => $lastRun,
'executionTime' => $runTime,
));
$scheduledJobLogId = $entityManager->saveEntity($scheduledJobLog);

View File

@@ -29,7 +29,7 @@ class Converter
{
private $metadata;
private $fileManager;
private $metadataUtils;
private $metadataHelper;
private $relationManager;
@@ -82,6 +82,15 @@ class Converter
'len' => '24',
);
/**
* Permitted Entity options which will be moved to ormMetadata
*
* @var array
*/
protected $permittedEntityOptions = array(
'indexes',
'additionalTables',
);
public function __construct(\Espo\Core\Utils\Metadata $metadata, \Espo\Core\Utils\File\Manager $fileManager)
{
@@ -90,10 +99,9 @@ class Converter
$this->relationManager = new RelationManager($this->metadata);
$this->metadataUtils = new \Espo\Core\Utils\Metadata\Utils($this->metadata);
$this->metadataHelper = new \Espo\Core\Utils\Metadata\Helper($this->metadata);
}
protected function getMetadata()
{
return $this->metadata;
@@ -118,9 +126,9 @@ class Converter
return $this->relationManager;
}
protected function getMetadataUtils()
protected function getMetadataHelper()
{
return $this->metadataUtils;
return $this->metadataHelper;
}
public function process()
@@ -153,8 +161,10 @@ class Converter
),
);
if (isset($entityMeta['indexes'])) {
$ormMeta[$entityName]['indexes'] = $entityMeta['indexes'];
foreach ($this->permittedEntityOptions as $optionName) {
if (isset($entityMeta[$optionName])) {
$ormMeta[$entityName][$optionName] = $entityMeta[$optionName];
}
}
$ormMeta[$entityName]['fields'] = $this->convertFields($entityName, $entityMeta);
@@ -225,31 +235,16 @@ class Converter
foreach($entityMeta['fields'] as $fieldName => $fieldParams) {
/** check if "fields" option exists in $fieldMeta */
$fieldTypeMeta = $this->getMetadataUtils()->getFieldDefsByType($fieldParams);
$fieldTypeMeta = $this->getMetadataHelper()->getFieldDefsByType($fieldParams);
if (isset($fieldTypeMeta['fields']) && is_array($fieldTypeMeta['fields'])) {
foreach($fieldTypeMeta['actualFields'] as $subFieldName) {
$subField = $this->convertActualFields($entityName, $fieldName, $fieldParams, $subFieldName, $fieldTypeMeta);
if (!isset($outputMeta[ $subField['naming'] ])) {
$subFieldDefs = $this->convertField($entityName, $subField['name'], $subField['params']);
if ($subFieldDefs !== false) {
$outputMeta[ $subField['naming'] ] = $subFieldDefs; //push fieldDefs to the main array
}
}
}
} else {
$fieldDefs = $this->convertField($entityName, $fieldName, $fieldParams, $fieldTypeMeta);
if ($fieldDefs !== false) {
$outputMeta[$fieldName] = $fieldDefs; //push fieldDefs to the main array
}
$fieldDefs = $this->convertField($entityName, $fieldName, $fieldParams, $fieldTypeMeta);
if ($fieldDefs !== false) {
$outputMeta[$fieldName] = $fieldDefs; //push fieldDefs to the main array
}
/** check and set the linkDefs from 'fields' metadata */
if (isset($fieldTypeMeta['linkDefs'])) {
$linkDefs = $this->getMetadataUtils()->getLinkDefsInFieldMeta($entityName, $fieldParams, $fieldTypeMeta['linkDefs']);
$linkDefs = $this->getMetadataHelper()->getLinkDefsInFieldMeta($entityName, $fieldParams, $fieldTypeMeta['linkDefs']);
if (isset($linkDefs)) {
if (!isset($entityMeta['links'])) {
$entityMeta['links'] = array();
@@ -329,15 +324,15 @@ class Converter
/** merge fieldDefs option from field definition */
if (!isset($fieldTypeMeta)) {
$fieldTypeMeta = $this->getMetadataUtils()->getFieldDefsByType($fieldParams);
$fieldTypeMeta = $this->getMetadataHelper()->getFieldDefsByType($fieldParams);
}
if (isset($fieldTypeMeta['fieldDefs'])) {
$fieldParams = Util::merge($fieldParams, $fieldTypeMeta['fieldDefs']);
}
/** check if need to skip this field in ORM metadata */
if (isset($fieldParams['skip']) && $fieldParams['skip'] === true) {
/** check if need to skipOrmDefs this field in ORM metadata */
if (isset($fieldParams['skipOrmDefs']) && $fieldParams['skipOrmDefs'] === true) {
return false;
}
@@ -361,37 +356,6 @@ class Converter
return $fieldDefs;
}
protected function convertActualFields($entityName, $fieldName, $fieldParams, $subFieldName, $fieldTypeMeta)
{
$subField = array();
$subField['params'] = $this->getInitValues($fieldParams);
if (isset($fieldTypeMeta['fieldDefs'])) {
$subField['params'] = Util::merge($subField['params'], $fieldTypeMeta['fieldDefs']);
}
//if empty field name, then use the main field
if (trim($subFieldName) == '') {
$subField['name'] = $fieldName;
$subField['naming'] = $fieldName;
} else {
$namingType = isset($fieldTypeMeta['naming']) ? $fieldTypeMeta['naming'] : $this->defaultNaming;
$subField['name'] = $subFieldName;
$subField['naming'] = Util::getNaming($fieldName, $subFieldName, $namingType);
if (isset($fieldTypeMeta['fields'][$subFieldName])) {
$subField['params'] = Util::merge($subField['params'], $fieldTypeMeta['fields'][$subFieldName]);
}
}
return $subField;
}
protected function convertLinks($entityName, $entityMeta, $ormMeta)
{
if (!isset($entityMeta['links'])) {

View File

@@ -22,6 +22,8 @@
namespace Espo\Core\Utils\Database\Orm\Relations;
use Espo\Core\Utils\Util;
class Base extends \Espo\Core\Utils\Database\Orm\Base
{
private $params;
@@ -119,8 +121,11 @@ class Base extends \Espo\Core\Utils\Database\Orm\Base
$additionalParrams = $this->getAllowedAdditionalParams($name);
if (isset($additionalParrams) && !isset($linkParams[$name])) {
if (isset($additionalParrams)) {
$linkParams[$name] = $additionalParrams;
if (isset($linkParams[$name]) && is_array($linkParams[$name])) {
$linkParams[$name] = Util::merge($linkParams[$name], $additionalParrams);
}
}
}
}

View File

@@ -89,7 +89,7 @@ class Converter
$GLOBALS['log']->debug('Schema\Converter - Start: building schema');
//check if exist files in "Tables" directory and merge with ormMetadata
$ormMeta = Util::merge($ormMeta, $this->getCustomTables());
$ormMeta = Util::merge($ormMeta, $this->getCustomTables($ormMeta));
//unset some keys in orm
if (isset($ormMeta['unset'])) {
@@ -335,11 +335,14 @@ class Converter
return $keyList;
}
/*
* @return array - ormMeta
/**
* Get custom table defenition in "application/Espo/Core/Utils/Database/Schema/tables/" and in metadata 'additionalTables'
*
* @param array $ormMeta
*
* @return array
*/
protected function getCustomTables()
protected function getCustomTables(array $ormMeta)
{
$customTables = array();
@@ -352,6 +355,13 @@ class Converter
}
}
//get custom tables from metdata 'additionalTables'
foreach ($ormMeta as $entityName => $entityParams) {
if (isset($entityParams['additionalTables']) && is_array($entityParams['additionalTables'])) {
$customTables = Util::merge($customTables, $entityParams['additionalTables']);
}
}
return $customTables;
}

View File

@@ -35,7 +35,7 @@ class EntityManager
private $fileManager;
private $metadataUtils;
private $metadataHelper;
public function __construct(Metadata $metadata, Language $language, File\Manager $fileManager)
{
@@ -43,7 +43,7 @@ class EntityManager
$this->language = $language;
$this->fileManager = $fileManager;
$this->metadataUtils = new \Espo\Core\Utils\Metadata\Utils($this->metadata);
$this->metadataHelper = new \Espo\Core\Utils\Metadata\Helper($this->metadata);
}
protected function getMetadata()
@@ -61,9 +61,9 @@ class EntityManager
return $this->fileManager;
}
protected function getMetadataUtils()
protected function getMetadataHelper()
{
return $this->metadataUtils;
return $this->metadataHelper;
}
public function create($name, $type, $params = array())
@@ -77,8 +77,8 @@ class EntityManager
$normalizedName = Util::normilizeClassName($name);
$contents = "<" . "?" . "php\n".
"namespace Espo\Custom\Entities;\n".
$contents = "<" . "?" . "php\n\n".
"namespace Espo\Custom\Entities;\n\n".
"class {$normalizedName} extends \Espo\Core\Templates\Entities\\{$type}\n".
"{\n".
" protected \$entityType = \"$name\";\n".
@@ -87,24 +87,24 @@ class EntityManager
$filePath = "custom/Espo/Custom/Entities/{$normalizedName}.php";
$this->getFileManager()->putContents($filePath, $contents);
$contents = "<" . "?" . "php\n".
"namespace Espo\Custom\Controllers;\n".
$contents = "<" . "?" . "php\n\n".
"namespace Espo\Custom\Controllers;\n\n".
"class {$normalizedName} extends \Espo\Core\Templates\Controllers\\{$type}\n".
"{\n".
"}\n";
$filePath = "custom/Espo/Custom/Controllers/{$normalizedName}.php";
$this->getFileManager()->putContents($filePath, $contents);
$contents = "<" . "?" . "php\n".
"namespace Espo\Custom\Services;\n".
$contents = "<" . "?" . "php\n\n".
"namespace Espo\Custom\Services;\n\n".
"class {$normalizedName} extends \Espo\Core\Templates\Services\\{$type}\n".
"{\n".
"}\n";
$filePath = "custom/Espo/Custom/Services/{$normalizedName}.php";
$this->getFileManager()->putContents($filePath, $contents);
$contents = "<" . "?" . "php\n".
"namespace Espo\Custom\Repositories;\n".
$contents = "<" . "?" . "php\n\n".
"namespace Espo\Custom\Repositories;\n\n".
"class {$normalizedName} extends \Espo\Core\Templates\Repositories\\{$type}\n".
"{\n".
"}\n";
@@ -142,11 +142,15 @@ class EntityManager
$this->getMetadata()->set('scopes', $name, $scopeData);
$filePath = "application/Espo/Core/Templates/Metadata/{$type}/entityDefs.json";
$entityDefsData = Json::decode($this->getFileManager()->getContents($filePath), true);
$entityDefsDataContents = $this->getFileManager()->getContents($filePath);
$entityDefsDataContents = str_replace('{entityType}', $name, $entityDefsDataContents);
$entityDefsData = Json::decode($entityDefsDataContents, true);
$this->getMetadata()->set('entityDefs', $name, $entityDefsData);
$filePath = "application/Espo/Core/Templates/Metadata/{$type}/clientDefs.json";
$clientDefsData = Json::decode($this->getFileManager()->getContents($filePath), true);
$clientDefsContents = $this->getFileManager()->getContents($filePath);
$clientDefsContents = str_replace('{entityType}', $name, $clientDefsContents);
$clientDefsData = Json::decode($clientDefsContents, true);
$this->getMetadata()->set('clientDefs', $name, $clientDefsData);
$this->getLanguage()->set('Global', 'scopeNames', $name, $labelSingular);
@@ -156,6 +160,11 @@ class EntityManager
$this->getMetadata()->save();
$this->getLanguage()->save();
$layoutsPath = "application/Espo/Core/Templates/Layouts/{$type}";
if ($this->getFileManager()->isDir($layoutsPath)) {
$this->getFileManager()->copy($layoutsPath, 'custom/Espo/Custom/Resources/layouts/' . $name);
}
return true;
}
@@ -184,6 +193,16 @@ class EntityManager
$this->getLanguage()->set('Global', 'scopeNamesPlural', $name, $labelPlural);
}
if (isset($data['sortBy'])) {
$entityDefsData = array(
'collection' => array(
'sortBy' => $data['sortBy'],
'asc' => !empty($data['asc'])
)
);
$this->getMetadata()->set('entityDefs', $name, $entityDefsData);
}
$this->getMetadata()->save();
$this->getLanguage()->save();
@@ -343,6 +362,10 @@ class EntityManager
)
)
);
if ($entityForeign == $entity) {
$dataLeft['links'][$link]['midKeys'] = ['leftId', 'rightId'];
$dataRight['links'][$linkForeign]['midKeys'] = ['rightId', 'leftId'];
}
break;
}

View File

@@ -31,7 +31,7 @@ class FieldManager
private $language;
private $metadataUtils;
private $metadataHelper;
protected $isChanged = null;
@@ -44,7 +44,7 @@ class FieldManager
$this->metadata = $metadata;
$this->language = $language;
$this->metadataUtils = new \Espo\Core\Utils\Metadata\Utils($this->metadata);
$this->metadataHelper = new \Espo\Core\Utils\Metadata\Helper($this->metadata);
}
protected function getMetadata()
@@ -57,9 +57,9 @@ class FieldManager
return $this->language;
}
protected function getMetadataUtils()
protected function getMetadataHelper()
{
return $this->metadataUtils;
return $this->metadataHelper;
}
public function read($name, $scope)
@@ -187,11 +187,6 @@ class FieldManager
}
}
if (isset($fieldDef['linkDefs'])) {
$linkDefs = $fieldDef['linkDefs'];
unset($fieldDef['linkDefs']);
}
$currentOptionList = array_keys((array) $this->getFieldDef($name, $scope));
foreach ($fieldDef as $defName => $defValue) {
if ( (!isset($defValue) || $defValue === '') && !in_array($defName, $currentOptionList) ) {
@@ -214,11 +209,16 @@ class FieldManager
{
$fieldDef = $this->prepareFieldDef($fieldName, $fieldDef, $scope);
$metaFieldDef = $this->getMetadataUtils()->getFieldDefsInFieldMeta($fieldDef);
$metaFieldDef = $this->getMetadataHelper()->getFieldDefsInFieldMeta($fieldDef);
if (isset($metaFieldDef)) {
$fieldDef = Util::merge($metaFieldDef, $fieldDef);
}
if (isset($fieldDef['linkDefs'])) {
$linkDefs = $fieldDef['linkDefs'];
unset($fieldDef['linkDefs']);
}
$defs = array(
'fields' => array(
$fieldName => $fieldDef,
@@ -226,7 +226,7 @@ class FieldManager
);
/** Save links for a field. */
$metaLinkDef = $this->getMetadataUtils()->getLinkDefsInFieldMeta($scope, $fieldDef);
$metaLinkDef = $this->getMetadataHelper()->getLinkDefsInFieldMeta($scope, $fieldDef);
if (isset($linkDefs) || isset($metaLinkDef)) {
$linkDefs = Util::merge((array) $metaLinkDef, (array) $linkDefs);
$defs['links'] = array(

View File

@@ -472,7 +472,7 @@ class Manager
$sourceFile = is_file($sourcePath) ? $sourcePath : $this->concatPaths(array($sourcePath, $file));
$destFile = $this->concatPaths(array($destPath, $file));
if (file_exists($sourceFile)) {
if (file_exists($sourceFile) && is_file($sourceFile)) {
$res &= copy($sourceFile, $destFile);
}
}
@@ -669,6 +669,17 @@ class Manager
return (bool) $res;
}
/**
* Check if $dirname is directory.
*
* @param string $dirname
* @return boolean
*/
public function isDir($dirname)
{
return is_dir($dirname);
}
/**
* Check if $filename is file. If $filename doesn'ot exist, check by pathinfo
*

View File

@@ -163,7 +163,7 @@ class Language
return $translated;
}
public function translateOption($value, $field, $scope)
public function translateOption($value, $field, $scope = 'Global')
{
$options = $this->get($scope. '.options.' . $field);
if (array_key_exists($value, $options)) {

View File

@@ -35,6 +35,7 @@ class Metadata
private $fileManager;
private $converter;
private $moduleConfig;
private $metadataHelper;
/**
* @var string - uses for loading default values
@@ -76,12 +77,6 @@ class Metadata
{
$this->config = $config;
$this->fileManager = $fileManager;
$this->unifier = new \Espo\Core\Utils\File\Unifier($this->fileManager);
$this->converter = new \Espo\Core\Utils\Database\Converter($this, $this->fileManager);
$this->moduleConfig = new \Espo\Core\Utils\Module($this->config, $this->fileManager);
}
protected function getConfig()
@@ -89,26 +84,47 @@ class Metadata
return $this->config;
}
protected function getUnifier()
{
return $this->unifier;
}
protected function getFileManager()
{
return $this->fileManager;
}
protected function getUnifier()
{
if (!isset($this->unifier)) {
$this->unifier = new \Espo\Core\Utils\File\Unifier($this->fileManager);
}
return $this->unifier;
}
protected function getConverter()
{
if (!isset($this->converter)) {
$this->converter = new \Espo\Core\Utils\Database\Converter($this, $this->fileManager);
}
return $this->converter;
}
protected function getModuleConfig()
{
if (!isset($this->moduleConfig)) {
$this->moduleConfig = new \Espo\Core\Utils\Module($this->config, $this->fileManager);
}
return $this->moduleConfig;
}
protected function getMetadataHelper()
{
if (!isset($this->metadataHelper)) {
$this->metadataHelper = new Metadata\Helper($this);
}
return $this->metadataHelper;
}
public function isCached()
{
if (!$this->getConfig()->get('useCache')) {
@@ -139,6 +155,7 @@ class Metadata
} else {
$this->meta = $this->getUnifier()->unify($this->name, $this->paths, true);
$this->meta = $this->setLanguageFromConfig($this->meta);
$this->meta = $this->addAdditionalFields($this->meta);
if ($this->getConfig()->get('useCache')) {
$isSaved = $this->getFileManager()->putPhpContents($this->cacheFile, $this->meta);
@@ -197,6 +214,7 @@ class Metadata
}
/**
* todo: move to a separate file
* Set language list and default for Settings, Preferences metadata
*
* @param array $data Meta
@@ -222,6 +240,37 @@ class Metadata
return $data;
}
/**
* todo: move to a separate file
* Add additional fields defined from metadata -> fields
*
* @param array $meta
*/
protected function addAdditionalFields(array $meta)
{
$metaCopy = $meta;
$definitionList = $meta['fields'];
foreach ($metaCopy['entityDefs'] as $entityName => $entityParams) {
foreach ($entityParams['fields'] as $fieldName => $fieldParams) {
$additionalFields = $this->getMetadataHelper()->getAdditionalFieldList($fieldName, $fieldParams, $definitionList);
if (!empty($additionalFields)) {
//merge or add to the end of meta array
foreach ($additionalFields as $subFieldName => $subFieldParams) {
if (isset($entityParams['fields'][$subFieldName])) {
$meta['entityDefs'][$entityName]['fields'][$subFieldName] = Util::merge($subFieldParams, $entityParams['fields'][$subFieldName]);
} else {
$meta['entityDefs'][$entityName]['fields'][$subFieldName] = $subFieldParams;
}
}
}
}
}
return $meta;
}
/**
* Set Metadata data
* Ex. $key1 = menu, $key2 = Account then will be created a file metadataFolder/menu/Account.json

View File

@@ -22,10 +22,26 @@
namespace Espo\Core\Utils\Metadata;
class Utils
use Espo\Core\Utils\Util;
class Helper
{
private $metadata;
protected $defaultNaming = 'postfix';
/**
* List of copied params for metadata -> 'fields' from parent items
*/
protected $copiedDefParams = array(
'readOnly',
'notStorable',
'layoutListDisabled',
'layoutDetailDisabled',
'layoutMassUpdateDisabled',
'layoutFiltersDisabled',
);
public function __construct(\Espo\Core\Utils\Metadata $metadata)
{
$this->metadata = $metadata;
@@ -102,7 +118,41 @@ class Utils
return $linkFieldDefsByType;
}
}
/**
* Get additional field list based on field definition in metadata 'fields'
*
* @param string $fieldName
* @param array $fieldParams
* @param array|null $definitionList
*
* @return array
*/
public function getAdditionalFieldList($fieldName, array $fieldParams, array $definitionList = null)
{
if (empty($fieldParams['type'])) {
return;
}
$fieldType = $fieldParams['type'];
$fieldDefinition = isset($definitionList[$fieldType]) ? $definitionList[$fieldType] : $this->getMetadata()->get('fields.'.$fieldType);
?>
if (!empty($fieldDefinition['fields']) && is_array($fieldDefinition['fields'])) {
$copiedParams = array_intersect_key($fieldParams, array_flip($this->copiedDefParams));
$additionalFields = array();
//add additional fields
foreach ($fieldDefinition['fields'] as $subFieldName => $subFieldParams) {
$namingType = isset($fieldDefinition['naming']) ? $fieldDefinition['naming'] : $this->defaultNaming;
$subFieldNaming = Util::getNaming($fieldName, $subFieldName, $namingType);
$additionalFields[$subFieldNaming] = array_merge($copiedParams, $subFieldParams);
}
return $additionalFields;
}
}
}

View File

@@ -100,6 +100,7 @@ return array (
'disabledCountQueryEntityList' => array('Email'),
'maxEmailAccountCount' => 2,
'followCreatedEntities' => false,
'b2cMode' => false,
'isInstalled' => false,
);

View File

@@ -18,9 +18,9 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Modules\Crm\Entities;
namespace Espo\Entities;
class InboundEmail extends \Espo\Core\ORM\Entity
{

View File

@@ -73,6 +73,12 @@ class Stream extends \Espo\Core\Hooks\Base
if ($this->checkHasStream($entity)) {
$this->getStreamService()->unfollowAllUsersFromEntity($entity);
}
$query = $this->getEntityManager()->getQuery();
$sql = "
DELETE FROM `note`
WHERE related_id = ".$query->quote($entity->id)." AND related_type = ".$query->quote($entity->getEntityType()) ."
";
$this->getEntityManager()->getPDO()->query($sql);
}
protected function handleCreateRelated(Entity $entity)
@@ -178,6 +184,10 @@ class Stream extends \Espo\Core\Hooks\Base
$this->getStreamService()->noteCreate($entity);
}
if (in_array($this->getUser()->id, $userIdList)) {
$entity->set('isFollowed', true);
}
$autofollowUserIdList = $this->getAutofollowUserIdList($entity, $userIdList);
foreach ($autofollowUserIdList as $i => $userId) {
if (in_array($userId, $userIdList)) {
@@ -207,6 +217,10 @@ class Stream extends \Espo\Core\Hooks\Base
if (!empty($assignedUserId)) {
$this->getStreamService()->followEntity($entity, $assignedUserId);
$this->getStreamService()->noteAssign($entity);
if ($this->getUser()->id === $assignedUserId) {
$entity->set('isFollowed', true);
}
}
}
$this->getStreamService()->handleAudited($entity);

View File

@@ -49,21 +49,26 @@ class Cleanup extends \Espo\Core\Jobs\Base
protected function cleanupScheduledJobLog()
{
$lastTenRecords = "SELECT c.id FROM (
SELECT i1.id
FROM scheduled_job_log_record i1
CROSS JOIN scheduled_job_log_record i2 ON ( i1.scheduled_job_id = i2.scheduled_job_id
AND i1.id < i2.id )
GROUP BY i1.id
HAVING COUNT( * ) <10
ORDER BY i1.created_at DESC
) AS c";
$query = "DELETE FROM `scheduled_job_log_record` WHERE DATE(created_at) < '".$this->getDate()."' AND id NOT IN (".$lastTenRecords.") ";
$pdo = $this->getEntityManager()->getPDO();
$sth = $pdo->prepare($query);
$sql = "SELECT id FROM scheduled_job";
$sth = $pdo->prepare($sql);
$sth->execute();
while ($row = $sth->fetch(\PDO::FETCH_ASSOC)) {
$id = $row['id'];
$lastRowsSql = "SELECT id FROM scheduled_job_log_record WHERE scheduled_job_id = '".$id."' ORDER BY created_at DESC LIMIT 0,10";
$lastRowsSth = $pdo->prepare($lastRowsSql);
$lastRowsSth->execute();
$lastRowIds = $lastRowsSth->fetchAll(\PDO::FETCH_COLUMN, 0);
$delSql = "DELETE FROM `scheduled_job_log_record`
WHERE scheduled_job_id = '".$id."'
AND DATE(created_at) < '".$this->getDate()."'
AND id NOT IN ('".implode("', '", $lastRowIds)."')
";
$pdo->query($delSql);
}
}
protected function getDate($format = 'Y-m-d')

View File

@@ -73,6 +73,10 @@ class Invitations
case 'date':
$contents = str_replace($key, $this->dateTime->convertSystemDateToGlobal($entity->get($field)), $contents);
break;
case 'jsonArray':
break;
case 'jsonObject':
break;
default:
$contents = str_replace($key, $entity->get($field), $contents);
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
@@ -30,22 +30,40 @@ class Call extends \Espo\Core\Controllers\Record
{
public function actionSendInvitations($params, $data)
{
{
if (empty($data['id'])) {
throw new BadRequest();
}
$entity = $this->getRecordService()->getEntity($data['id']);
if (!$entity) {
throw new NotFound();
}
}
if (!$this->getAcl()->check($entity, 'edit')) {
throw new Forbidden();
}
return $this->getRecordService()->sendInvitations($entity);
}
public function actionMassSetHeld($params, $data)
{
if (empty($data['ids']) && !is_array($data['ids'])) {
throw new BadRequest();
}
return $this->getRecordService()->massSetHeld($data['ids']);
}
public function actionMassSetNotHeld($params, $data)
{
if (empty($data['ids']) && !is_array($data['ids'])) {
throw new BadRequest();
}
return $this->getRecordService()->massSetNotHeld($data['ids']);
}
}

View File

@@ -18,7 +18,7 @@
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
************************************************************************/
************************************************************************/
namespace Espo\Modules\Crm\Controllers;
@@ -27,25 +27,43 @@ use \Espo\Core\Exceptions\BadRequest;
use \Espo\Core\Exceptions\NotFound;
class Meeting extends \Espo\Core\Controllers\Record
{
{
public function actionSendInvitations($params, $data)
{
{
if (empty($data['id'])) {
throw new BadRequest();
}
$entity = $this->getRecordService()->getEntity($data['id']);
if (!$entity) {
throw new NotFound();
}
}
if (!$this->getAcl()->check($entity, 'edit')) {
throw new Forbidden();
}
return $this->getRecordService()->sendInvitations($entity);
}
public function actionMassSetHeld($params, $data)
{
if (empty($data['ids']) && !is_array($data['ids'])) {
throw new BadRequest();
}
return $this->getRecordService()->massSetHeld($data['ids']);
}
public function actionMassSetNotHeld($params, $data)
{
if (empty($data['ids']) && !is_array($data['ids'])) {
throw new BadRequest();
}
return $this->getRecordService()->massSetNotHeld($data['ids']);
}
}

View File

@@ -61,6 +61,14 @@ class Task extends \Espo\Core\ORM\Repositories\RDB
{
parent::beforeSave($entity, $options);
if ($entity->isFieldChanged('status')) {
if ($entity->get('status') == 'Completed') {
$entity->set('dateCompleted', date('Y-m-d H:i:s'));
} else {
$entity->set('dateCompleted', null);
}
}
if ($entity->has('dateStartDate')) {
$dateStartDate = $entity->get('dateStartDate');
if (!empty($dateStartDate)) {

View File

@@ -64,5 +64,9 @@
"labels": {
"Create Account": "Create Account",
"Copy Billing": "Copy Billing"
},
"presetFilters": {
"customers": "Customers",
"partners": "Partners"
}
}

View File

@@ -1,5 +1,6 @@
{
"layouts": {
"detailConvert": "Convert Lead"
"detailConvert": "Convert Lead",
"listForAccount": "List (for Account)"
}
}

View File

@@ -33,6 +33,10 @@
"Tentative": "Tentative"
}
},
"massActions": {
"setHeld": "Set Held",
"setNotHeld": "Set Not Held"
},
"labels": {
"Create Call": "Create Call",
"Set Held": "Set Held",

View File

@@ -0,0 +1,7 @@
{
"labels": {
"Create Lead": "Create Lead",
"Create Contact": "Create Contact",
"Create Task": "Create Task"
}
}

View File

@@ -10,7 +10,6 @@
"Call": "Call",
"Task": "Task",
"Case": "Case",
"InboundEmail": "Inbound Email",
"Document": "Document",
"Campaign": "Campaign",
"TargetList": "Target List"
@@ -26,7 +25,6 @@
"Call": "Calls",
"Task": "Tasks",
"Case": "Cases",
"InboundEmail": "Inbound Emails",
"Document": "Documents",
"Campaign": "Campaigns",
"TargetList": "Target Lists"

View File

@@ -50,6 +50,7 @@
}
},
"presetFilters": {
"active": "Active"
"active": "Active",
"converted": "Converted"
}
}

View File

@@ -28,6 +28,10 @@
"Tentative": "Tentative"
}
},
"massActions": {
"setHeld": "Set Held",
"setNotHeld": "Set Not Held"
},
"labels": {
"Create Meeting": "Create Meeting",
"Set Held": "Set Held",

View File

@@ -10,9 +10,12 @@
"priority": "Priority",
"description": "Description",
"isOverdue": "Is Overdue",
"account": "Account"
"account": "Account",
"dateCompleted": "Date Completed",
"attachments": "Attachments"
},
"links": {
"attachments": "Attachments"
},
"options": {
"status": {

View File

@@ -2,39 +2,67 @@
"fields": {
"name": "Nom",
"emailAddress": "Email",
"website": "Site Web",
"website": "Site internet",
"phoneNumber": "Téléphone",
"billingAddress": "Adresse de Facturation",
"shippingAddress": "Adresse de Livraison",
"billingAddress": "Adresse de facturation",
"shippingAddress": "Adresse de livraison",
"description": "Description",
"sicCode": "Code SIC",
"sicCode": "Sic Code",
"industry": "Industrie",
"type": "Type",
"contactRole": "Rôle"
"contactRole": "Titre",
"campaign": "Campagne"
},
"links": {
"contacts": "Contacts",
"opportunities": "Opportunités",
"cases": "Tickets"
"cases": "Tickets",
"documents": "Documents",
"meetingsPrimary": "Rendez-vous (étendus)",
"callsPrimary": "Appels (étendus)",
"tasksPrimary": "Tâches (étendues)",
"emailsPrimary": "Emails (étendus)",
"targetLists": "Listes de cible",
"campaignLogRecords": "Log de Campagne"
},
"options": {
"type": {
"Customer": "Clients",
"Customer": "Client",
"Investor": "Investisseur",
"Partner": "Partenaire",
"Reseller": "Revendeur"
"Reseller": "Commercialisateur"
},
"industry": {
"Apparel": "Vêtements",
"Agriculture": "Agriculture",
"Advertising": "Publicité",
"Apparel & Accessories": "Mode et accessoires",
"Automotive": "Auto",
"Banking": "Banque",
"Computer Software": "Logiciel Informatique",
"Biotechnology": "Biotechnologie",
"Chemical": "Chimie",
"Computer": "Informatique",
"Education": "Education",
"Electronics": "Electronique",
"Entertainment & Leisure": "Divertissement et loisir",
"Finance": "Finance",
"Insurance": "Assurance"
"Food & Beverage": "Alimentation",
"Grocery": "Epicerie",
"Insurance": "Assurance",
"Legal": "Droit",
"Publishing": "Publication",
"Real Estate": "Immobilier",
"Service": "Service",
"Sports": "Sports",
"Software": "Logiciel",
"Technology": "Technologie",
"Telecommunications": "Télécommunications",
"Television": "Télévision",
"Transportation": "Transport",
"Venture Capital": "Investissement"
}
},
"labels": {
"Create Account": "Nouveau Compte"
"Create Account": "Créer un compte",
"Copy Billing": "Copie de facturation"
}
}

View File

@@ -0,0 +1,5 @@
{
"layouts": {
"detailConvert": "Convertir le prospect"
}
}

View File

@@ -3,32 +3,45 @@
"name": "Nom",
"parent": "Parent",
"status": "Statut",
"dateStart": "Date de Début",
"dateEnd": "Date de Fin",
"dateStart": "Date de début",
"dateEnd": "Date de fin",
"direction": "Direction",
"duration": "Durée",
"description": "Description",
"users": "Utilisateurs",
"contacts": "Contacts",
"leads": "Leads"
"leads": "Prospects",
"reminders": "Rappels",
"account": "Compte"
},
"links": {
},
"options": {
"status": {
"Planned": "Plannifié",
"Held": "Fait",
"Not Held": "Pas Fait"
"Planned": "Prévu",
"Held": "Tenu",
"Not Held": "Non tenu"
},
"direction": {
"Outbound": "Sortie",
"Inbound": "Entrée"
"Outbound": "Sortant",
"Inbound": "Entrant"
},
"acceptanceStatus": {
"None": "Aucun",
"Accepted": "Accepté",
"Declined": "Décliné",
"Tentative": "Tentative"
}
},
"labels": {
"Create Call": "Générer l'appel",
"Set Held": "Marquer Fait",
"Set Not Held": "Marquer Pas Fait",
"Send Invitations": "Envoi d'Invitations"
"Create Call": "Créer un Appel",
"Set Held": "Qualifier en Tenu",
"Set Not Held": "Qualifier en Non tenu",
"Send Invitations": "Envoyer les invitations"
},
"presetFilters": {
"planned": "Prévu",
"held": "Tenu",
"todays": "Aujourd'hui"
}
}

View File

@@ -0,0 +1,54 @@
{
"fields": {
"name": "Nom",
"description": "Description",
"status": "Statut",
"type": "Type",
"startDate": "Date de début",
"endDate": "Date de fin",
"targetLists": "Listes de cibles",
"sentCount": "Envoyé",
"openedCount": "Ouvert",
"clickedCount": "Cliqué",
"optedOutCount": "Désinscrit",
"bouncedCount": "Renvoyé",
"hardBouncedCount": "Rejeté fortement",
"softBouncedCount": "Rejeté",
"leadCreatedCount": "Prospects créés",
"revenue": "Revenu"
},
"links": {
"targetLists": "Listes de cibles",
"accounts": "Comptes",
"contacts": "Contacts",
"leads": "Prospects",
"opportunities": "Opportunités",
"campaignLogRecords": "Enregistrer"
},
"options": {
"type": {
"Email": "Email",
"Web": "Web",
"Television": "Télévision",
"Radio": "Radio",
"Newsletter": "Newsletter",
"Mail": "Mail"
},
"status": {
"Planning": "Planning",
"Active": "Actif",
"Inactive": "Inactif",
"Complete": "Terminer"
}
},
"labels": {
"Create Campaign": "Créer une Campagne",
"Target Lists": "Listes de cibles",
"Statistics": "Statistiques",
"hard": "fort",
"soft": "faible"
},
"presetFilters": {
"active": "Actif"
}
}

View File

@@ -0,0 +1,24 @@
{
"fields": {
"action": "Action",
"actionDate": "Date",
"data": "Donnée",
"campaign": "Campagne",
"parent": "Cible",
"object": "Objet",
"application": "Application"
},
"options": {
"action": {
"Sent": "Envoyé",
"Opened": "Ouvert",
"Opted Out": "Désinscrit",
"Bounced": "Renvoyé",
"Clicked": "Cliqué",
"Lead Created": "Prospect créé"
}
},
"labels": {
"All": "Tous"
}
}

View File

@@ -1,7 +1,7 @@
{
"fields": {
"name": "Nom",
"number": "Numéro",
"number": "Nombre",
"status": "Statut",
"account": "Compte",
"contact": "Contact",
@@ -15,16 +15,16 @@
"status": {
"New": "Nouveau",
"Assigned": "Assigné",
"Pending": "En attente",
"Pending": "En cours",
"Closed": "Fermé",
"Rejected": "Rejeté",
"Duplicate": "Doublon"
"Duplicate": "Dupliquer"
},
"priority" : {
"Low": "Bas",
"Normal": "Normal",
"High": "Haut",
"Urgent": "Urgent"
"Low": "Basse",
"Normal": "Normale",
"High": "Haute",
"Urgent": "Urgente"
},
"type": {
"Question": "Question",
@@ -33,6 +33,10 @@
}
},
"labels": {
"Create Case": "Créer un Ticket"
"Create Case": "Créer un ticket"
},
"presetFilters": {
"open": "Ouvert",
"closed": "Fermé"
}
}

View File

@@ -6,26 +6,31 @@
"account": "Compte",
"accounts": "Comptes",
"phoneNumber": "Téléphone",
"accountType": "Type de Compte",
"doNotCall": "Ne Pas Appeler",
"accountType": "Type de compte",
"doNotCall": "Ne pas appeler",
"address": "Adresse",
"opportunityRole": "Rôle de Challenge",
"accountRole": "Rôle",
"description": "Description"
"opportunityRole": "Rôle d'opportunité",
"accountRole": "Titre",
"description": "Description",
"campaign": "Campagne",
"targetLists": "Listes de cibles",
"targetList": "Liste de cibles"
},
"links": {
"opportunities": "Opportunités",
"cases": "Tickets"
"cases": "Tickets",
"targetLists": "Listes de cibles",
"campaignLogRecords": "Rapporter une campagne"
},
"labels": {
"Create Contact": "Créer un contact"
"Create Contact": "Créer un Contact"
},
"options": {
"opportunityRole": {
"": "--Aucun--",
"Decision Maker": "Décisionnaire",
"Evaluator": "*Evaluator",
"Influencer": "Prescripteur"
"Evaluator": "Évaluateur",
"Influencer": "Influenceur"
}
}
}

View File

@@ -0,0 +1,32 @@
{
"labels": {
"Create Document": "Créer un Document",
"Details": "Détails"
},
"fields": {
"name": "Nom",
"status": "Statut",
"file": "Fichier",
"type": "Type",
"source": "Source",
"publishDate": "Date de publication",
"expirationDate": "Date d'expiration",
"description": "Description"
},
"links": {
"accounts": "Comptes",
"opportunities": "Opportunités"
},
"options": {
"status": {
"Active": "Actif",
"Draft": "Brouillon",
"Expired": "Expiré",
"Canceled": "Annulé"
}
},
"presetFilters": {
"active": "Actif",
"draft": "Brouillon"
}
}

View File

@@ -2,20 +2,23 @@
"scopeNames": {
"Account": "Compte",
"Contact": "Contact",
"Lead": "Lead",
"Lead": "Prospect",
"Target": "Cible",
"Opportunity": "Challenge",
"Opportunity": "Opportunité",
"Meeting": "Rendez-vous",
"Calendar": "Calendrier",
"Call": "Appel",
"Task": "Tâche",
"Case": "Ticket",
"InboundEmail": "Email Entrant"
"InboundEmail": "Email entrant",
"Document": "Document",
"Campaign": "Campagne",
"TargetList": "Liste de cibles"
},
"scopeNamesPlural": {
"Account": "Comptes",
"Contact": "Contacts",
"Lead": "Leads",
"Lead": "Prospects",
"Target": "Cibles",
"Opportunity": "Opportunités",
"Meeting": "Rendez-vous",
@@ -23,57 +26,75 @@
"Call": "Appels",
"Task": "Tâches",
"Case": "Tickets",
"InboundEmail": "Emails Entrants"
"InboundEmail": "Emails entrants",
"Document": "Documents",
"Campaign": "Campagnes",
"TargetList": "Listes de cibles"
},
"dashlets": {
"Leads": "My Leads",
"Opportunities": "Mes Challenges",
"Tasks": "Mes Tâches",
"Cases": "Mes Tickets",
"Leads": "Mes prospects",
"Opportunities": "Mes opportunités",
"Tasks": "Mes tâches",
"Cases": "Mes tickets",
"Calendar": "Calendrier",
"OpportunitiesByStage": "*Challenges par étages",
"OpportunitiesByLeadSource": "Challenges par Lead Source",
"SalesByMonth": "Ventes par Mois",
"SalesPipeline": "Tuyaux des ventes"
"Calls": "Mes appels",
"Meetings": "Mes rendez-vous",
"OpportunitiesByStage": "Opportunités par étape",
"OpportunitiesByLeadSource": "Opportunités par source de prospects",
"SalesByMonth": "Ventes par mois",
"SalesPipeline": "Canaux de vente"
},
"labels": {
"Create InboundEmail": "Créer une boîte email",
"Create InboundEmail": "Créer un email entrant",
"Activities": "Activités",
"History": "Historique",
"Attendees": "Participants",
"Schedule Meeting": "Rendez-vous Planifiés",
"Schedule Call": "Appels Planifiés",
"Compose Email": "Cer un Email",
"Log Meeting": "Journal des Rendez-vous",
"Log Call": "Journal d'appels",
"Archive Email": "Archiver les Emails",
"Create Task": "Créer une tâche",
"Schedule Meeting": "Planifier un rendez-vous",
"Schedule Call": "Programmer un appel",
"Compose Email": "Composer un Email",
"Log Meeting": "Rapporter un rendez-vous",
"Log Call": "Rapporter un appel",
"Archive Email": "Archiver l'Email",
"Create Task": "Créer une Tâche",
"Tasks": "Tâches"
},
"fields": {
"billingAddressCity": "Ville",
"billingAddressCountry": "Pays",
"billingAddressPostalCode": "Code Postal",
"billingAddressState": "Département",
"billingAddressState": "Région",
"billingAddressStreet": "Rue",
"addressCity": "Ville",
"addressStreet": "Rue",
"addressCountry": "Pays",
"addressState": "Département",
"addressState": "Régions",
"addressPostalCode": "Code Postal",
"shippingAddressCity": "City (Shipping)",
"shippingAddressStreet": "Street (Shipping)",
"shippingAddressCountry": "Country (Shipping)",
"shippingAddressState": "State (Shipping)",
"shippingAddressPostalCode": "Postal Code (Shipping)"
"shippingAddressCity": "Ville (livraison)",
"shippingAddressStreet": "Rue (livraison)",
"shippingAddressCountry": "Pays (livraison)",
"shippingAddressState": "Région (livraison)",
"shippingAddressPostalCode": "Code Postal (livraison)"
},
"links": {
"contacts": "Contacts",
"opportunities": "Opportunités",
"leads": "Leads",
"leads": "Prospects",
"meetings": "Rendez-vous",
"calls": "Appels",
"tasks": "Tâches",
"emails": "Courriers"
"emails": "Emails",
"accounts": "Comptes",
"cases": "Tickets",
"documents": "Documents",
"account": "Compte",
"opportunity": "Opportunité",
"contact": "Contact",
"parent": "Parent"
},
"options": {
"reminderTypes": {
"Popup": "Popup",
"Email": "Email"
}
}
}

View File

@@ -1,41 +1,52 @@
{
"fields": {
"name": "Nom",
"team": "Equipe",
"team": "Équipe",
"status": "Statut",
"assignToUser": "Assigné à l'Utilisateur",
"assignToUser": "Assigner à l'utilisateur",
"host": "Hôte",
"username": "Nom d'utilisateur",
"password": "Mot de Passe",
"port": "Porte",
"monitoredFolders": "Dossiers Surveillés",
"password": "Mot de passe",
"port": "Port",
"monitoredFolders": "Dossiers gérés",
"trashFolder": "Corbeille",
"ssl": "SSL",
"createCase": "Créer un Ticket",
"reply": "Répondre",
"ssl": "SSL",
"createCase": "Créer un ticket",
"reply": "Réponse automatique",
"caseDistribution": "Distribution de tickets",
"replyEmailTemplate": "Modèle de Réponse par Email",
"replyFromAddress": "Répondre Depuis l'Adresse",
"replyFromName": "Répondre Depuis le Nom"
"replyEmailTemplate": "Modèle email de réponse",
"replyFromAddress": "Répondre depuis l'adresse",
"replyToAddress": "Répondre à l'adresse",
"replyFromName": "Répondre au nom de",
"targetUserPosition": "Position de l'utilisateur cible"
},
"tooltips": {
"reply": "Avertissez les expéditeurs par courrier électronique que leurs e-mails ont été reçus.",
"createCase": "Automatiquement créer un ticket à la réception d'un mail.",
"replyToAddress": "Spécifier l'adresse email de cette boîte pour que les réponses arrivent ici.",
"caseDistribution": "Comment les cas seront assignés. Assignés directement à l'utilisateur ou parmi l'équipe.",
"assignToUser": "Les e-mails / tickets de l'utilisateur y seront affectés.",
"team": "Les e-mails / tickets de l'équipe seront liés.",
"targetUserPosition": "Définir la position des utilisateurs qui se partageront les tickets."
},
"links": {
},
"options": {
"status": {
"Active": "Activer",
"Inactive": "Désactiver"
"Active": "Actif",
"Inactive": "Inactif"
},
"caseDistribution": {
"Direct-Assignment": "Assignation Directe",
"Direct-Assignment": "Direct-Affectation",
"Round-Robin": "Round-Robin",
"Least-Busy": "Least-Busy"
"Least-Busy": "Moins-Occupé"
}
},
"labels": {
"Create InboundEmail": "Créer une boîte email",
"Create InboundEmail": "Créer un email entrant",
"IMAP": "IMAP",
"Actions": "Actions",
"Main": "Principal"
"Main": "Principale"
},
"messages": {
"couldNotConnectToImap": "Impossible de se connecter au serveur IMAP"

View File

@@ -1,46 +1,55 @@
{
"labels": {
"Converted To": "Convertir Vers",
"Create Lead": "Créer Lead",
"Converted To": "Converti en",
"Create Lead": "Créer un prospect",
"Convert": "Convertir"
},
"fields": {
"name": "Nom",
"emailAddress": "Email",
"title": "Titre",
"website": "Site Web",
"website": "Site internet",
"phoneNumber": "Téléphone",
"accountName": "Nom du Compte",
"doNotCall": "Ne Pas Appeler",
"accountName": "Nom du compte",
"doNotCall": "Ne pas appeler",
"address": "Adresse",
"status": "Statut",
"source": "Source",
"opportunityAmount": "Montant du Challenge",
"opportunityAmount": "Montant en jeu de l'opportunité",
"opportunityAmountConverted": "Montant en jeu de l'opportunité (converti)",
"description": "Description",
"createdAccount": "Compte",
"createdContact": "Contact",
"createdOpportunity": "Challenge"
"createdOpportunity": "Opportunité",
"campaign": "Campagne",
"targetLists": "Listes de cibles",
"targetList": "Liste de cibles"
},
"links": {
"targetLists": "Listes de cibles",
"campaignLogRecords": "Log de campagne"
},
"options": {
"status": {
"New": "Nouveau",
"Assigned": "Assigné",
"In Process": "En Cours de Traitement",
"In Process": "En cours",
"Converted": "Converti",
"Recycled": "Supprimé",
"Dead": "Mort"
"Recycled": "Recyclé",
"Dead": "Dead"
},
"source": {
"Call": "Appel",
"Email": "Email",
"Existing Customer": "Client Existant",
"Existing Customer": "Client existant",
"Partner": "Partenaire",
"Public Relations": "Relations publiques",
"Web Site": "Site Web",
"Web Site": "Site internet",
"Campaign": "Campagne",
"Other": "Autre"
}
},
"presetFilters": {
"active": "Actif"
}
}

View File

@@ -3,27 +3,42 @@
"name": "Nom",
"parent": "Parent",
"status": "Statut",
"dateStart": "Date de Début",
"dateEnd": "Date de Fin",
"dateStart": "Date de début",
"dateEnd": "Date de fin",
"duration": "Durée",
"description": "Description",
"users": "Utilisateurs",
"contacts": "Contacts",
"leads": "Leads"
"leads": "Prospects",
"reminders": "Rappels",
"account": "Compte"
},
"links": {
},
"options": {
"status": {
"Planned": "Plannifié",
"Held": "Fait",
"Not Held": "Pas Fait"
"Planned": "Prévu",
"Held": "Tenu",
"Not Held": "Non tenu"
},
"acceptanceStatus": {
"None": "Aucun",
"Accepted": "Accepté",
"Declined": "Décliné",
"Tentative": "Tentative"
}
},
"labels": {
"Create Meeting": "Créer un Rendez-vous",
"Set Held": "Marquer Fait",
"Set Not Held": "Marquer Pas Fait",
"Send Invitations": "Envoi d'Invitations"
"Set Held": "Qualifier en tenu",
"Set Not Held": "Qualifier en non tenu",
"Send Invitations": "Envoyer des Invitations",
"on time": "à l'heure",
"before": "en avance"
},
"presetFilters": {
"planned": "Prévu",
"held": "Tenu",
"todays": "Aujourd'hui"
}
}

View File

@@ -2,33 +2,41 @@
"fields": {
"name": "Nom",
"account": "Compte",
"stage": "Etage",
"stage": "Etape",
"amount": "Montant",
"probability": "Probabilité, %",
"leadSource": "Lead Source",
"doNotCall": "Ne Pas Appeler",
"leadSource": "Source du prospect",
"doNotCall": "Ne pas appeler",
"closeDate": "Date de fermeture",
"contacts": "Contacts",
"description": "Description"
"description": "Description",
"amountConverted": "Montant (converti)",
"amountWeightedConverted": "Montant pondéré",
"campaign": "Campagne"
},
"links": {
"contacts": "Contacts"
"contacts": "Contacts",
"documents": "Documents"
},
"options": {
"stage": {
"Prospecting": "En Prospection",
"Prospecting": "Prospection",
"Qualification": "Qualification",
"Needs Analysis": "Analyse des besoins",
"Value Proposition": "Montant de la Proposition",
"Id. Decision Makers": "Id. Décisionnaire",
"Value Proposition": "Valeur de la proposition",
"Id. Decision Makers": "Id. Decisionnaire",
"Perception Analysis": "Analyse de la perception",
"Proposal/Price Quote": "Proposition/Devis",
"Negotiation/Review": "Négociation/avis",
"Closed Won": "Closed Won",
"Closed Lost": "Closed Lost"
"Proposal/Price Quote": "Proposition/devis",
"Negotiation/Review": "Négociation/évaluation",
"Closed Won": "Conclusion gagnante",
"Closed Lost": "Conclusion perdante"
}
},
"labels": {
"Create Opportunity": "Créer un Challenge"
"Create Opportunity": "Créer une opportunité"
},
"presetFilters": {
"open": "Ouvrir",
"won": "Gagné"
}
}

View File

@@ -0,0 +1,10 @@
{
"options": {
"job": {
"CheckInboundEmails": "Vérifier les emails entrants",
"CheckEmailAccounts": "Vérifier ses comptes emails personnels",
"SendEmailReminders": "Envoyer des emails de rappel"
}
}
}

View File

@@ -3,17 +3,17 @@
"name": "Nom",
"emailAddress": "Email",
"title": "Titre",
"website": "Site Web",
"accountName": "Nom du Compte",
"website": "Site internet",
"accountName": "Nom du compte",
"phoneNumber": "Téléphone",
"doNotCall": "Ne Pas Appeler",
"doNotCall": "Ne pas appeler",
"address": "Adresse",
"description": "Description"
},
"links": {
},
"labels": {
"Create Target": "Créer une Cible",
"Convert to Lead": "Convertir en Lead"
"Create Target": "Créer une cible",
"Convert to Lead": "Convertir en prospect"
}
}

View File

@@ -0,0 +1,28 @@
{
"fields": {
"name": "Nom",
"description": "Description",
"entryCount": "Compteur d'entrées",
"campaigns": "Campagnes",
"endDate": "Date de fin",
"targetLists": "Listes de cibles"
},
"links": {
"accounts": "Comptes",
"contacts": "Contacts",
"leads": "Prospects",
"campaigns": "Campagnes"
},
"options": {
"type": {
"Email": "Email",
"Web": "Web",
"Television": "Télévision",
"Radio": "Radio",
"Newsletter": "Newsletter"
}
},
"labels": {
"Create TargetList": "Créer une liste de cibles"
}
}

View File

@@ -3,29 +3,40 @@
"name": "Nom",
"parent": "Parent",
"status": "Statut",
"dateStart": "Date de Début",
"dateStart": "Date de début",
"dateEnd": "Date d'échéance",
"dateStartDate": "Date de début (toute la journée)",
"dateEndDate": "Date de fin (toute la journée)",
"priority": "Priorité",
"description": "Description",
"isOverdue": "Est en Retard"
"isOverdue": "En retard",
"account": "Compte"
},
"links": {
},
"options": {
"status": {
"Not Started": "Pas Commencé",
"Started": "Commencé",
"Not Started": "N'a pas démarré",
"Started": "Démarré",
"Completed": "Terminé",
"Canceled": "Annulé"
"Canceled": "Annulé",
"Deferred": "Reporté"
},
"priority" : {
"Low": "Bas",
"Normal": "Normal",
"High": "Haut",
"Urgent": "Urgent"
"Low": "Basse",
"Normal": "Normale",
"High": "Haute",
"Urgent": "Urgente"
}
},
"labels": {
"Create Task": "Créer une tâche"
"Create Task": "Créer une Tâche",
"Complete": "Terminer"
},
"presetFilters": {
"actual": "En cours",
"completed": "Terminés",
"todays": "Aujourd'hui",
"overdue": "En retard"
}
}

View File

@@ -0,0 +1,5 @@
{
"links": {
"targetLists": "Listes de cibles"
}
}

View File

@@ -1,68 +1,72 @@
{
"fields": {
"name": "Ім'я",
"emailAddress": "Електронна пошта",
"website": "Інтернет сайт",
"emailAddress": "Емейл",
"website": "Вебсайт",
"phoneNumber": "Телефон",
"billingAddress": "Платіжний адреса",
"billingAddress": "Платіжна адреса",
"shippingAddress": "Поштова адреса",
"description": "Опис",
"sicCode": "SicCode",
"sicCode": "Код SIC",
"industry": "Промисловість",
"type": "Тип",
"contactRole": "Назва",
"contactRole": "Посада",
"campaign": "Кампанія"
},
"links": {
"contacts": "Контакти",
"opportunities": "Угоди",
"cases": "Звернення",
"cases": "Кейси",
"documents": "Документи",
"meetingsPrimary": "Meetings (expanded)",
"callsPrimary": "Calls (expanded)",
"tasksPrimary": "Tasks (expanded)",
"emailsPrimary": "Emails (expanded)",
"targetLists": "Цільові Списки",
"campaignLogRecords": "Кампанія Журналу"
"targetLists": "Цільові списки",
"campaignLogRecords": "Журнал кампанія"
},
"options": {
"type": {
"Customer": "Замовник",
"Investor": "Вкладник",
"Investor": "Інвестор",
"Partner": "Партнер",
"Reseller": "Посередник"
},
"industry": {
"Agriculture": "Сільське господарство",
"Advertising": "Реклама",
"Apparel & Accessories": "Одяг Та Аксесуари",
"Apparel & Accessories": "Одяг та аксесуари",
"Automotive": "Автомобільні",
"Banking": "Банківська справа",
"Banking": "Банкінґ",
"Biotechnology": "Біотехнології",
"Chemical": "Хімічний",
"Computer": "Комп'ютер",
"Chemical": "Хемія",
"Computer": "Комп'ютери",
"Education": "Освіта",
"Electronics": "Електроніка",
"Entertainment & Leisure": "Розваги Та Відпочинок",
"Entertainment & Leisure": "Розваги та дозвілля",
"Finance": "Фінанси",
"Food & Beverage": "Їжа І Напої",
"Food & Beverage": "Їжа та напої",
"Grocery": "Доставка",
"Insurance": "Страхування",
"Legal": "Юридичні",
"Publishing": "Публікації",
"Legal": "Право",
"Publishing": "Видавництво",
"Real Estate": "Нерухомість",
"Service": "Сервіс",
"Sports": "Спорт",
"Software": "Програмне забезпечення",
"Technology": "Технологія",
"Software": "Проґрамне забезпечення",
"Technology": "Технолоґія",
"Telecommunications": "Телекомунікації",
"Television": "Телебачення",
"Transportation": "Транспорт",
"Venture Capital": "Венчурний Капітал"
"Venture Capital": "Венчурний капітал"
}
},
"labels": {
"Create Account": "Створити контрагента",
"Copy Billing": "Копію Білінгу"
"Create Account": "Створити контраґента",
"Copy Billing": "Копія рахунку"
},
"presetFilters": {
"customers": "Customers",
"partners": "Partners"
}
}

View File

@@ -1,5 +1,6 @@
{
"layouts": {
"detailConvert": "Перетворити потенційного клієнта"
"detailConvert": "Конвертувати лід",
"listForAccount": "List (for Account)"
}
}

View File

@@ -5,43 +5,47 @@
"status": "статус",
"dateStart": "Дата початку",
"dateEnd": "Дата закінчення",
"direction": "Категорія",
"direction": "Напрямок",
"duration": "Тривалість",
"description": "Опис",
"users": "Користувачі",
"contacts": "Контакти",
"leads": "Потенційні клієнти",
"leads": "Ліди",
"reminders": "Нагадування",
"account": "Контрагент"
"account": "Контраґент"
},
"links": {
},
"options": {
"status": {
"Planned": "Запланований",
"Held": "Виконаний",
"Not Held": "Не відбувся"
"Planned": "Заплановано",
"Held": "Виконано",
"Not Held": "Не відбулося"
},
"direction": {
"Outbound": "Вихідний",
"Inbound": "Вхідний"
"Outbound": "Вихідне",
"Inbound": "Вхідне"
},
"acceptanceStatus": {
"None": "Нема",
"Accepted": "Прийнятий",
"Declined": "Відхилений",
"Tentative": "Попередній"
"Accepted": "Прийнято",
"Declined": "Відхилено",
"Tentative": "Попереднє"
}
},
"massActions": {
"setHeld": "Позначити виконаним",
"setNotHeld": "Позначити невиконаним"
},
"labels": {
"Create Call": "Новий дзвінок",
"Set Held": "Був виконаний",
"Set Not Held": "Набір Не Проводиться",
"Create Call": "Створити дзвінок",
"Set Held": "Позначити виконаним",
"Set Not Held": "Позначити невиконаним",
"Send Invitations": "Відправити запрошення"
},
"presetFilters": {
"planned": "Запланований",
"held": "Виконаний",
"todays": "На сьогодні"
"planned": "Заплановано",
"held": "Виконано",
"todays": "Сьогоднішнє"
}
}

View File

@@ -6,32 +6,32 @@
"type": "Тип",
"startDate": "Дата Початку",
"endDate": "Дата Закінчення",
"targetLists": "Цільові Списки",
"targetLists": "Цільові списки",
"sentCount": "Відправлено",
"openedCount": "Відкритий",
"clickedCount": "Натиснув",
"openedCount": "Відкрито",
"clickedCount": "Цикнуте",
"optedOutCount": "Відмовлено",
"bouncedCount": "Відскочив",
"hardBouncedCount": "Жорсткий Відскочив",
"softBouncedCount": "М'яка Відскочив",
"leadCreatedCount": "Призводить Створена",
"bouncedCount": "Відшито",
"hardBouncedCount": "Жорстко відшито",
"softBouncedCount": "М'яко відшито",
"leadCreatedCount": "Ліди створені",
"revenue": "Виручка"
},
"links": {
"targetLists": "Цільові Списки",
"accounts": "Контрагенти",
"targetLists": "Цільові списки",
"accounts": "Контраґенти",
"contacts": "Контакти",
"leads": "Потенційні клієнти",
"leads": "Ліди",
"opportunities": "Угоди",
"campaignLogRecords": "Лоґ"
},
"options": {
"type": {
"Email": "Електронна пошта",
"Web": "Веб -",
"Email": "Емейл",
"Web": "Веб",
"Television": "Телебачення",
"Radio": "Радіо",
"Newsletter": "Розсилку",
"Newsletter": "Розсилка",
"Mail": "Пошта"
},
"status": {
@@ -42,11 +42,11 @@
}
},
"labels": {
"Create Campaign": "Створити Кампанію",
"Target Lists": "Цільові Списки",
"Create Campaign": "Створити кампанію",
"Target Lists": "Цільові списки",
"Statistics": "Статистика",
"hard": "жорсткий",
"soft": "м'який"
"hard": "жорстко",
"soft": "м'яко"
},
"presetFilters": {
"active": "Активний"

View File

@@ -4,18 +4,18 @@
"actionDate": "Дата",
"data": "Дані",
"campaign": "Кампанія",
"parent": "Цільовий",
"parent": "Ціль",
"object": "Об'єкт",
"application": "Додаток"
},
"options": {
"action": {
"Sent": "Відправлено",
"Opened": "Відкритий",
"Opened": "Відкрито",
"Opted Out": "Відмовлено",
"Bounced": "Відскочив",
"Clicked": "Натиснув",
"Lead Created": "Привести Створена"
"Bounced": "Відшито",
"Clicked": "Цикнуте",
"Lead Created": "Лід створено"
}
},
"labels": {

View File

@@ -1,9 +1,9 @@
{
"fields": {
"name": "Ім'я",
"number": "Номер",
"number": "Нумер",
"status": "статус",
"account": "Контрагент",
"account": "Контраґент",
"contact": "Контакт",
"priority": "Пріоритет",
"type": "Тип",
@@ -21,19 +21,19 @@
"Duplicate": "Дуплікат"
},
"priority" : {
"Low": "Низький",
"Low": "Низько",
"Normal": "Нормальний",
"High": "Високий",
"High": "Високо",
"Urgent": "Терміново"
},
"type": {
"Question": "Питання",
"Incident": "Подія",
"Incident": "Випадок",
"Problem": "Проблема"
}
},
"labels": {
"Create Case": "Створити звернення"
"Create Case": "Створити кейс"
},
"presetFilters": {
"open": "Відкрити",

View File

@@ -1,36 +1,36 @@
{
"fields": {
"name": "Ім'я",
"emailAddress": "Електронна пошта",
"title": "Назва",
"account": "Контрагент",
"accounts": "Контрагенти",
"emailAddress": "Емейл",
"title": "Посада",
"account": "Контраґент",
"accounts": "Контраґенти",
"phoneNumber": "Телефон",
"accountType": "Тип контрагента",
"accountType": "Тип контраґента",
"doNotCall": "Не дзвонити",
"address": "Адреса",
"opportunityRole": "Роль угоди",
"accountRole": "Назва",
"accountRole": "Посада",
"description": "Опис",
"campaign": "Кампанія",
"targetLists": "Цільові Списки",
"targetList": "Цільовий Список"
"targetLists": "Цільові списки",
"targetList": "Цільовий список"
},
"links": {
"opportunities": "Угоди",
"cases": "Звернення",
"targetLists": "Цільові Списки",
"campaignLogRecords": "Кампанія Журналу"
"cases": "Кейси",
"targetLists": "Цільові списки",
"campaignLogRecords": "Журнал кампанія"
},
"labels": {
"Create Contact": "Створити контакт"
},
"options": {
"opportunityRole": {
"": "--Ні--",
"": "--Немає--",
"Decision Maker": "Приймає рішення",
"Evaluator": "Оцінювач",
"Influencer": "Консультант"
"Influencer": "Впливає"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"labels": {
"Create Document": "Створити Документ",
"Create Document": "Створити документ",
"Details": "Деталі"
},
"fields": {
@@ -9,19 +9,19 @@
"file": "Файл",
"type": "Тип",
"source": "Джерело",
"publishDate": "Дата Публікації",
"expirationDate": "Термін Придатності",
"publishDate": "Дата публікації",
"expirationDate": "Термін придатности",
"description": "Опис"
},
"links": {
"accounts": "Контрагенти",
"accounts": "Контраґенти",
"opportunities": "Угоди"
},
"options": {
"status": {
"Active": "Активний",
"Draft": "Чернетка",
"Expired": "Закінчився",
"Expired": "Прострочено",
"Canceled": "Скасовано"
}
},

View File

@@ -0,0 +1,7 @@
{
"labels": {
"Create Lead": "Створили лід",
"Create Contact": "Створити контакт",
"Create Task": "Створити завдання"
}
}

View File

@@ -1,47 +1,45 @@
{
"scopeNames": {
"Account": "Контрагент",
"Account": "Контраґент",
"Contact": "Контакт",
"Lead": "Потенційний клієнт",
"Target": "Цільовий",
"Lead": "Лід",
"Target": "Ціль",
"Opportunity": "Угода",
"Meeting": "Зустріч",
"Calendar": "Календар",
"Call": "Виклик",
"Call": "Дзвінок",
"Task": "Завдання",
"Case": "Звернення",
"InboundEmail": "Вхідна пошта",
"Case": "Кейс",
"Document": "Документ",
"Campaign": "Кампанія",
"TargetList": "Цільовий Список"
"TargetList": "Цільовий список"
},
"scopeNamesPlural": {
"Account": "Контрагенти",
"Account": "Контраґенти",
"Contact": "Контакти",
"Lead": "Потенційні клієнти",
"Lead": "Ліди",
"Target": "Цілі",
"Opportunity": "Угоди",
"Meeting": "Зустрічі",
"Calendar": "Календар",
"Call": "Дзвінки",
"Task": "Завдання",
"Case": "Звернення",
"InboundEmail": "Вхідні повідомлення",
"Case": "Кейси",
"Document": "Документи",
"Campaign": "Кампаній",
"TargetList": "Цільові Списки"
"Campaign": "Кампанії",
"TargetList": "Цільові списки"
},
"dashlets": {
"Leads": "Мої потенційні клієнти",
"Leads": "Мої ліди",
"Opportunities": "Мої угоди",
"Tasks": "Мої завдання",
"Cases": "Мої звернення",
"Cases": "Мої кейси",
"Calendar": "Календар",
"Calls": "Мої дзвінки",
"Meetings": "Мої зустрічі",
"OpportunitiesByStage": "Угоди на стадії",
"OpportunitiesByLeadSource": "Операції з джерела потенційного клієнта",
"SalesByMonth": "Продажу по місяцях",
"OpportunitiesByLeadSource": "Угоди за джерелом лідів",
"SalesByMonth": "Продажі по місяцях",
"SalesPipeline": "Джерела продажу"
},
"labels": {
@@ -49,11 +47,11 @@
"Activities": "Заходи",
"History": "Історія",
"Attendees": "Учасники",
"Schedule Meeting": "Запланувати зустріч",
"Schedule Call": "Запланувати дзвінок",
"Compose Email": "Створити e-mail",
"Log Meeting": "Записати зустріч",
"Log Call": "Записати дзвінок",
"Schedule Meeting": "Розклад зустрічей",
"Schedule Call": "Розклад дзвінків",
"Compose Email": "Написати емейл",
"Log Meeting": "Протокол зустрічей",
"Log Call": "Протокол дзвінків",
"Archive Email": "Архівувати листа",
"Create Task": "Створити завдання",
"Tasks": "Завдання"
@@ -78,15 +76,15 @@
"links": {
"contacts": "Контакти",
"opportunities": "Угоди",
"leads": "Потенційні клієнти",
"leads": "Ліди",
"meetings": "Зустрічі",
"calls": "Дзвінки",
"tasks": "Завдання",
"emails": "Листи",
"accounts": "Контрагенти",
"cases": "Звернення",
"accounts": "Контраґенти",
"cases": "Кейси",
"documents": "Документи",
"account": "Контрагент",
"account": "Контраґент",
"opportunity": "Угода",
"contact": "Контакт",
"parent": "Джерело"
@@ -94,7 +92,7 @@
"options": {
"reminderTypes": {
"Popup": "Спливаюче вікно",
"Email": "Електронна пошта"
"Email": "Емейл"
}
}
}

View File

@@ -1,55 +1,56 @@
{
"labels": {
"Converted To": "Перетворений в",
"Create Lead": "Створити потенційного клієнта",
"Convert": "Перетворити"
"Converted To": "Перетворено на",
"Create Lead": "Створили лід",
"Convert": "Конвертувати"
},
"fields": {
"name": "Ім'я",
"emailAddress": "Електронна пошта",
"title": "Назва",
"website": "Інтернет сайт",
"emailAddress": "Емейл",
"title": "Посада",
"website": "Вебсайт",
"phoneNumber": "Телефон",
"accountName": "Ім'я контрагента",
"accountName": "Ім'я контраґента",
"doNotCall": "Не дзвонити",
"address": "Адреса",
"status": "статус",
"source": "Джерело",
"opportunityAmount": "Сума угоди",
"opportunityAmountConverted": "Сума угоди (конвертований)",
"opportunityAmountConverted": "Сума угоди (конвертована)",
"description": "Опис",
"createdAccount": "Контрагент",
"createdAccount": "Контраґент",
"createdContact": "Контакт",
"createdOpportunity": "Угода",
"campaign": "Кампанія",
"targetLists": "Цільові Списки",
"targetList": "Цільовий Список"
"targetLists": "Цільові списки",
"targetList": "Цільовий список"
},
"links": {
"targetLists": "Цільові Списки",
"campaignLogRecords": "Кампанія Журналу"
"targetLists": "Цільові списки",
"campaignLogRecords": "Журнал кампанія"
},
"options": {
"status": {
"New": "Новий",
"Assigned": "На розгляді",
"In Process": "У процесі",
"Converted": "Перетворене",
"Recycled": "Відновлений",
"Dead": "Мертвий"
"Converted": "Конвертована",
"Recycled": "У кошику",
"Dead": "Мертве"
},
"source": {
"Call": "Виклик",
"Email": "Електронна пошта",
"Existing Customer": "Існуючі Служби",
"Call": "Дзвінок",
"Email": "Емейл",
"Existing Customer": "Існуючі замовники",
"Partner": "Партнер",
"Public Relations": "Зв'язки З Громадськістю",
"Web Site": "Веб-Сайт",
"Public Relations": "Зв'язки із громадськістю",
"Web Site": "Вебсайт",
"Campaign": "Кампанія",
"Other": "Додатково"
}
},
"presetFilters": {
"active": "Активний"
"active": "Активний",
"converted": "Конвертована"
}
}

View File

@@ -9,36 +9,40 @@
"description": "Опис",
"users": "Користувачі",
"contacts": "Контакти",
"leads": "Потенційні клієнти",
"leads": "Ліди",
"reminders": "Нагадування",
"account": "Контрагент"
"account": "Контраґент"
},
"links": {
},
"options": {
"status": {
"Planned": "Запланований",
"Held": "Виконаний",
"Not Held": "Не відбувся"
"Planned": "Заплановано",
"Held": "Виконано",
"Not Held": "Не відбулося"
},
"acceptanceStatus": {
"None": "Нема",
"Accepted": "Прийнятий",
"Declined": "Відхилений",
"Tentative": "Попередній"
"Accepted": "Прийнято",
"Declined": "Відхилено",
"Tentative": "Попереднє"
}
},
"massActions": {
"setHeld": "Позначити виконаним",
"setNotHeld": "Позначити невиконаним"
},
"labels": {
"Create Meeting": "Створити зустріч",
"Set Held": "Був виконаний",
"Set Not Held": "Набір Не Проводиться",
"Set Held": "Позначити виконаним",
"Set Not Held": "Позначити невиконаним",
"Send Invitations": "Відправити запрошення",
"on time": "на час",
"before": "перед"
},
"presetFilters": {
"planned": "Запланований",
"held": "Виконаний",
"todays": "На сьогодні"
"planned": "Заплановано",
"held": "Виконано",
"todays": "Сьогоднішнє"
}
}

View File

@@ -1,17 +1,17 @@
{
"fields": {
"name": "Ім'я",
"account": "Контрагент",
"account": "Контраґент",
"stage": "Стадія",
"amount": "Сума",
"probability": "Ймовірність успіху, %",
"leadSource": "Джерело потенційного клієнта",
"probability": "Імовірність, %",
"leadSource": "Джерело ліда",
"doNotCall": "Не дзвонити",
"closeDate": "Дата закриття",
"contacts": "Контакти",
"description": "Опис",
"amountConverted": "Сума (сконвертирована)",
"amountWeightedConverted": "Сума Зважених",
"amountConverted": "Сума (конвертирована)",
"amountWeightedConverted": "Зважена сума",
"campaign": "Кампанія"
},
"links": {
@@ -20,16 +20,16 @@
},
"options": {
"stage": {
"Prospecting": "Залучення клієнта",
"Qualification": "Оцінка можливості",
"Prospecting": "Проспектінґ",
"Qualification": "Кваліфікація",
"Needs Analysis": "Вимагає аналізу",
"Value Proposition": "Вибір пропозиції/оферти",
"Id. Decision Makers": "Визначення відповідальної особи",
"Perception Analysis": "Проведення аналізу",
"Proposal/Price Quote": "Відправлено пропозиція/оферта",
"Negotiation/Review": "Узгодження/розгляд",
"Closed Won": "Закрито - Успіх",
"Closed Lost": "Закрито - Провал"
"Value Proposition": "Цінова пропозиція",
"Id. Decision Makers": "Визначення осіб, приймаючих рішення",
"Perception Analysis": "Аналізу сприйняття",
"Proposal/Price Quote": "Квота пропозицій/цін",
"Negotiation/Review": "Заперечення/перегляд",
"Closed Won": "Закрито переможно",
"Closed Lost": "Закрито провалом"
}
},
"labels": {
@@ -37,6 +37,6 @@
},
"presetFilters": {
"open": "Відкрити",
"won": "Успішні"
"won": "Переможні"
}
}

View File

@@ -3,8 +3,8 @@
"options": {
"job": {
"CheckInboundEmails": "Перевірити пошту",
"CheckEmailAccounts": "Перевірка Особистих Облікових Записів Електронної Пошти",
"SendEmailReminders": "Відправляти Нагадування По Електронній Пошті"
"CheckEmailAccounts": "Перевірити особисті емейл-акаунти",
"SendEmailReminders": "Відправити нагадування емейлом"
}
}
}

View File

@@ -1,10 +1,10 @@
{
"fields": {
"name": "Ім'я",
"emailAddress": "Електронна пошта",
"title": "Назва",
"website": "Інтернет сайт",
"accountName": "Ім'я контрагента",
"emailAddress": "Емейл",
"title": "Посада",
"website": "Вебсайт",
"accountName": "Ім'я контраґента",
"phoneNumber": "Телефон",
"doNotCall": "Не дзвонити",
"address": "Адреса",
@@ -13,7 +13,7 @@
"links": {
},
"labels": {
"Create Target": "Створити мета",
"Convert to Lead": "Перетворити потенційного клієнта"
"Create Target": "Створити ціль",
"Convert to Lead": "Конвертувати на лід"
}
}

View File

@@ -2,27 +2,27 @@
"fields": {
"name": "Ім'я",
"description": "Опис",
"entryCount": "Запис Графа",
"campaigns": "Кампаній",
"entryCount": "Облік записа",
"campaigns": "Кампанії",
"endDate": "Дата Закінчення",
"targetLists": "Цільові Списки"
"targetLists": "Цільові списки"
},
"links": {
"accounts": "Контрагенти",
"accounts": "Контраґенти",
"contacts": "Контакти",
"leads": "Потенційні клієнти",
"campaigns": "Кампаній"
"leads": "Ліди",
"campaigns": "Кампанії"
},
"options": {
"type": {
"Email": "Електронна пошта",
"Web": "Веб -",
"Email": "Емейл",
"Web": "Веб",
"Television": "Телебачення",
"Radio": "Радіо",
"Newsletter": "Розсилку"
"Newsletter": "Розсилка"
}
},
"labels": {
"Create TargetList": "Створити Цільовий Список"
"Create TargetList": "Створити цільовий список"
}
}

View File

@@ -4,28 +4,31 @@
"parent": "Джерело",
"status": "статус",
"dateStart": "Дата початку",
"dateEnd": "Дата Зв'язку",
"dateEnd": "Належна дата",
"dateStartDate": "Date Start (all day)",
"dateEndDate": "Date End (all day)",
"priority": "Пріоритет",
"description": "Опис",
"isOverdue": "Прострочена",
"account": "Контрагент"
"isOverdue": "Прострочено",
"account": "Контраґент",
"dateCompleted": "Date Completed",
"attachments": "Вкладення"
},
"links": {
"attachments": "Вкладення"
},
"options": {
"status": {
"Not Started": "Не почалася",
"Started": "Почалася",
"Not Started": "Не почалося",
"Started": "Почалося",
"Completed": "Завершено",
"Canceled": "Скасовано",
"Deferred": "Відстрочені"
"Deferred": "Відстрочено"
},
"priority" : {
"Low": "Низький",
"Low": "Низько",
"Normal": "Нормальний",
"High": "Високий",
"High": "Високо",
"Urgent": "Терміново"
}
},
@@ -34,9 +37,9 @@
"Complete": "Повне"
},
"presetFilters": {
"actual": "Фактичні",
"actual": "Актуально",
"completed": "Завершено",
"todays": "На сьогодні",
"overdue": "Прострочені"
"todays": "Сьогоднішнє",
"overdue": "Прострочено"
}
}

Some files were not shown because too many files have changed in this diff Show More