Compare commits

...

6 Commits

Author SHA1 Message Date
Yuri Kuznetsov 655a499caa v 2022-04-27 15:45:28 +03:00
Yuri Kuznetsov bcf6f33965 no data gray 2022-04-27 13:33:34 +03:00
Yuri Kuznetsov 7c04febb3b fix invitation error 2022-04-27 10:59:45 +03:00
Yuri Kuznetsov 4e7779ee48 fix entity manager edit 2022-04-27 10:14:09 +03:00
Yuri Kuznetsov 4b17896ff1 ref 2022-04-25 16:42:08 +03:00
Yuri Kuznetsov caf20a5e61 global search fix 2022-04-25 13:14:31 +03:00
12 changed files with 46 additions and 27 deletions
+27 -14
View File
@@ -295,17 +295,21 @@ class Util
*/
public static function arrayToObject($array)
{
/** @phpstan-var mixed $array */
/** @var \stdClass */
return self::arrayToObjectInternal($array);
}
if (is_array($array)) {
/** @var callable */
$callable = ['static', 'arrayToObject'];
return (object) array_map($callable, $array);
/**
* @param mixed $value
* @return mixed
*/
private static function arrayToObjectInternal($value)
{
if (is_array($value)) {
return (object) array_map(fn($v) => self::arrayToObjectInternal($v), $value);
}
/** @var \stdClass */
return $array;
return $value;
}
/**
@@ -316,16 +320,25 @@ class Util
*/
public static function objectToArray($object)
{
/** @phpstan-var mixed $object */
/** @var array<string,mixed> */
return self::objectToArrayInternal($object);
}
if (is_object($object)) {
$object = (array) $object;
/**
* @param mixed $value
* @return mixed
*/
private static function objectToArrayInternal($value)
{
if (is_object($value)) {
$value = (array) $value;
}
/** @var callable */
$callable = ['static', 'objectToArray'];
if (is_array($value)) {
return array_map(fn($v) => self::objectToArrayInternal($v), $value);
}
return is_array($object) ? array_map($callable, $object) : $object;
return $value;
}
/**
@@ -211,8 +211,6 @@ class Invitations
->withMessage($message)
->withAttachments([$attachment])
->send($email);
$this->entityManager->removeEntity($email);
}
protected function getIscContents(Entity $entity): string
+2 -1
View File
@@ -31,6 +31,7 @@ namespace Espo\Services;
use Espo\ORM\Query\Select;
use Espo\ORM\Query\Part\Order;
use Espo\ORM\Query\Part\Expression as Expr;
use Espo\Core\Di;
use Espo\Core\Select\Text\FullTextSearch\DataComposerFactory as FullTextSearchDataComposerFactory;
@@ -219,7 +220,7 @@ class GlobalSearch implements
->order($expression, Order::DESC);
}
else {
$queryBuilder->select('VALUE:1.1', 'relevance');
$queryBuilder->select(Expr::value(1.1), 'relevance');
}
$queryBuilder->order('name');
+2 -2
View File
@@ -73,7 +73,7 @@
{{#if isEmptyList}}
<div class="margin-top">
{{translate 'No Data'}}
<div class="margin-top no-data">
{{translate 'No Data'}}
</div>
{{/if}}
@@ -75,5 +75,5 @@
{{/if}}
{{else}}
{{translate 'No Data'}}
<div class="no-data">{{translate 'No Data'}}</div>
{{/if}}
+1 -1
View File
@@ -10,7 +10,7 @@
{{#unless rowList.length}}
{{#if createDisabled}}
{{#unless showRoot}}
{{translate 'No Data'}}
<div class="no-data">{{translate 'No Data'}}</div>
{{/unless}}
{{/if}}
{{/unless}}
+1 -1
View File
@@ -193,5 +193,5 @@
{{/if}}
{{else}}
{{translate 'No Data'}}
<div class="no-data">{{translate 'No Data'}}</div>
{{/if}}
@@ -391,6 +391,7 @@ define('views/admin/entity-manager/edit', ['view', 'model'], function (Dep, Mode
hasColorField: this.hasColorField,
hasStreamField: this.hasStreamField,
isCustom: this.isCustom,
subjectEntityType: this.scope,
}).then(view => {
this.listenTo(view, 'save', () => this.actionSave());
this.listenTo(view, 'cancel', () => this.actionCancel());
@@ -47,6 +47,8 @@ define('views/admin/entity-manager/record/edit', 'views/record/edit', function (
this.scope = 'EntityManager';
this.subjectEntityType = this.options.subjectEntityType;
if (!this.isCreate) {
this.buttonList = [
{
@@ -165,7 +167,7 @@ define('views/admin/entity-manager/record/edit', 'views/record/edit', function (
let statusField = this.model.get('statusField');
var optionList = this.getMetadata()
.get(['entityDefs', this.scope, 'fields', statusField, 'options']) || [];
.get(['entityDefs', this.subjectEntityType, 'fields', statusField, 'options']) || [];
this.setFieldOptionList('kanbanStatusIgnoreList', optionList);
@@ -186,8 +188,8 @@ define('views/admin/entity-manager/record/edit', 'views/record/edit', function (
var statusField = this.model.get('statusField');
var translation = this.getMetadata()
.get(['entityDefs', this.scope, 'fields', statusField, 'translation']) ||
this.scope + '.options.' + statusField;
.get(['entityDefs', this.subjectEntityType, 'fields', statusField, 'translation']) ||
this.subjectEntityType + '.options.' + statusField;
fieldView.params.translation = translation;
fieldView.setupTranslation();
+4
View File
@@ -1003,6 +1003,10 @@ ul.dropdown-menu > li.checkbox:last-child {
}
}
.panel-body .list-container > .no-data {
color: var(--gray-light);
}
ul.dropdown-menu > li > a > .check-icon + div {
padding-right: 20px;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.1.2",
"version": "7.1.3",
"lockfileVersion": 2,
"requires": true,
"packages": {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.1.2",
"version": "7.1.3",
"description": "Open-source CRM.",
"repository": {
"type": "git",