diff --git a/application/Espo/Core/Controllers/RecordTree.php b/application/Espo/Core/Controllers/RecordTree.php index 37ee9a797a..66f267056b 100644 --- a/application/Espo/Core/Controllers/RecordTree.php +++ b/application/Espo/Core/Controllers/RecordTree.php @@ -63,15 +63,12 @@ class RecordTree extends Record return (object) $this->actionListTree($request->getRouteParams(), $request->getParsedBody(), $request); } - $where = $request->getQueryParams()['where'] ?? null; + $selectParams = $this->fetchSearchParamsFromRequest($request); + $parentId = $request->getQueryParam('parentId'); $maxDepth = $request->getQueryParam('maxDepth'); $onlyNotEmpty = (bool) $request->getQueryParam('onlyNotEmpty'); - if ($where !== null && !is_array($where)) { - throw new BadRequest(); - } - if ($maxDepth !== null) { $maxDepth = (int) $maxDepth; } @@ -79,7 +76,7 @@ class RecordTree extends Record $collection = $this->getRecordTreeService()->getTree( $parentId, [ - 'where' => $where, + 'where' => $selectParams->getWhere(), 'onlyNotEmpty' => $onlyNotEmpty, ], $maxDepth diff --git a/application/Espo/Services/RecordTree.php b/application/Espo/Services/RecordTree.php index 5ce2b89b26..e24c2afe35 100644 --- a/application/Espo/Services/RecordTree.php +++ b/application/Espo/Services/RecordTree.php @@ -64,7 +64,7 @@ class RecordTree extends Record protected $categoryField = null; /** - * @param array $params + * @param array{where?: ?WhereItem, onlyNotEmpty?: bool} $params * @return ?Collection * @throws Forbidden * @throws BadRequest @@ -84,7 +84,7 @@ class RecordTree extends Record } /** - * @param array $params + * @param array{where?: ?WhereItem, onlyNotEmpty?: bool} $params * @return ?Collection * @throws BadRequest * @throws Forbidden @@ -104,7 +104,11 @@ class RecordTree extends Record return null; } - $searchParams = SearchParams::fromRaw($params); + $searchParams = SearchParams::create(); + + if (isset($params['where'])) { + $searchParams = $searchParams->withWhere($params['where']); + } $selectBuilder = $this->selectBuilderFactory ->create() diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index b63257d8ee..3fb8e9cbee 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -453,7 +453,7 @@ class CalendarView extends View { start + this.rangeSeparator + end : start; } else { - title = moment(view.currentStart).format(format); + title = this.dateToMoment(view.currentStart).format(format); } if (this.options.userId && this.options.userName) { diff --git a/client/res/templates/fields/formula/edit.tpl b/client/res/templates/fields/formula/edit.tpl index 3a7fb1eb9b..0c74b7dd95 100644 --- a/client/res/templates/fields/formula/edit.tpl +++ b/client/res/templates/fields/formula/edit.tpl @@ -1,16 +1,15 @@ - -
-
+
+
{{value}}
{{#if hasSide}} -
+
{{#if hasCheckSyntax}} @@ -18,7 +17,7 @@ {{#if hasInsert}}