Compare commits

...

7 Commits
6.0.7 ... 6.0.8

Author SHA1 Message Date
Yuri Kuznetsov
d3d710b2b9 v 2020-12-04 15:04:36 +02:00
Yuri Kuznetsov
4426d81e77 fix category tree 2020-12-04 14:28:04 +02:00
Yuri Kuznetsov
6b3e81e3fd settings currency validation 2020-12-03 11:56:44 +02:00
Yuri Kuznetsov
dd708778d6 field clone validations 2020-12-03 11:56:15 +02:00
Yuri Kuznetsov
0bc06f3cae fix autofollow 2020-12-02 11:04:33 +02:00
Yuri Kuznetsov
0ab8853455 fix notification for portal user 2020-12-01 13:14:17 +02:00
Yuri Kuznetsov
a612ffd2d2 fix pdf google maps 2020-12-01 11:40:23 +02:00
9 changed files with 44 additions and 11 deletions

View File

@@ -148,14 +148,12 @@ class GoogleMaps
$GLOBALS['log']->debug("Template helper _googleMapsImage: URL: {$url}.");
$image = \Espo\Core\TemplateHelpers\GoogleMaps::getImage($url);
$image = \Espo\Classes\TemplateHelpers\GoogleMaps::getImage($url);
if (!$image) {
return null;
}
$filePath = tempnam(sys_get_temp_dir(), 'google_maps_image');
file_put_contents($filePath, $image);

View File

@@ -49,6 +49,9 @@ class CategoryTree extends Database
->select()
->from($pathEntityType)
->select(['ascendorId', "'" . $entity->id . "'"])
->where([
'descendorId' => $parentId,
])
->build();
$subSelect2 = $em->getQueryBuilder()

View File

@@ -270,6 +270,7 @@
"notModified": "You have not modified the record",
"duplicate": "The record you are creating might already exist",
"dropToAttach": "Drop to attach",
"fieldInvalid": "{field} is invalid",
"fieldIsRequired": "{field} is required",
"fieldShouldBeEmail": "{field} should be a valid email",
"fieldShouldBeFloat": "{field} should be a valid float",

View File

@@ -12,7 +12,7 @@
},
"userId": {
"type": "varchar",
"maxLength": 11,
"maxLength": 24,
"index": true
}
}

View File

@@ -81,7 +81,7 @@ class Notification extends \Espo\Services\Record implements
$collection = $this->entityManager->createCollection();
$userList = $this->getEntityManager()->getRepository('User')
->select(['id'])
->select(['id', 'type'])
->where([
'isActive' => true,
'id' => $userIdList,
@@ -90,7 +90,10 @@ class Notification extends \Espo\Services\Record implements
foreach ($userList as $user) {
$userId = $user->id;
if (!$this->checkUserNoteAccess($user, $note)) continue;
if (!$this->checkUserNoteAccess($user, $note)) {
continue;
}
if ($note->get('createdById') === $user->id) continue;
if ($related && $related->getEntityType() == 'Email' && $related->get('sentById') == $user->id) continue;
if ($related && $related->get('createdById') == $user->id) continue;

View File

@@ -257,6 +257,8 @@ define('views/fields/base', 'view', function (Dep) {
this.events = {};
}
this.validations = Espo.Utils.clone(this.validations);
this.defs = this.options.defs || {};
this.name = this.options.name || this.defs.name;
this.params = this.options.params || this.defs.params || {};

View File

@@ -25,14 +25,40 @@
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('views/settings/fields/default-currency', 'views/fields/enum', function (Dep) {
define('views/settings/fields/default-currency', 'views/fields/enum', function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.validations.push('existing');
},
setupOptions: function () {
this.params.options = Espo.Utils.clone(this.getConfig().get('currencyList') || []);
}
},
validateExisting: function () {
var currencyList = this.model.get('currencyList');
if (!currencyList) {
return;
}
var value = this.model.get(this.name);
if (~currencyList.indexOf(value)) {
return;
}
var msg = this.translate('fieldInvalid', 'messages').replace('{field}', this.getLabelText());
this.showValidationMessage(msg);
return true;
},
});
});

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "6.0.7",
"version": "6.0.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "6.0.7",
"version": "6.0.8",
"description": "",
"main": "index.php",
"repository": {