mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-02-05 11:08:40 +00:00
test fixes and changes for release
This commit is contained in:
parent
92ba086d06
commit
2373817784
|
|
@ -171,14 +171,15 @@ final class BackendController extends Controller
|
|||
$tree[$ref][$component->getId()]['obj'] = $component;
|
||||
|
||||
$parent = $component->parent->getId();
|
||||
if (!($component instanceof Position) // parent could be in different department then ignore
|
||||
|| (!($component->parent instanceof NullPosition) && $component->parent->department->getId() === $component->department->getId())
|
||||
if ($parent !== 0
|
||||
&& (!($component instanceof Position) // parent could be in different department then ignore
|
||||
|| $component->parent->department->getId() === $component->department->getId()
|
||||
)
|
||||
) {
|
||||
if (!isset($tree[$ref][$parent])) {
|
||||
$tree[$ref][$parent] = ['obj' => null, 'children' => [], 'index' => 0];
|
||||
}
|
||||
|
||||
// For some stupid reason the next line is too complicated for phpstan and the error it creates is insane/wrong!
|
||||
/** @phpstan-ignore-next-line */
|
||||
$tree[$ref][$parent]['children'][] = &$tree[$ref][$component->getId()];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,10 +54,10 @@ class Unit implements \JsonSerializable
|
|||
/**
|
||||
* Parent
|
||||
*
|
||||
* @var null|Unit
|
||||
* @var Unit
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public ?self $parent = null;
|
||||
public self $parent;
|
||||
|
||||
/**
|
||||
* Description.
|
||||
|
|
|
|||
|
|
@ -257,6 +257,25 @@ $CONFIG = [
|
|||
'root' => '/',
|
||||
'https' => false,
|
||||
],
|
||||
'app' => [
|
||||
'path' => __DIR__,
|
||||
'default' => [
|
||||
'app' => 'Backend',
|
||||
'id' => 'backend',
|
||||
'lang' => 'en',
|
||||
'theme' => 'Backend',
|
||||
'org' => 1,
|
||||
],
|
||||
'domains' => [
|
||||
'127.0.0.1' => [
|
||||
'app' => 'Backend',
|
||||
'id' => 'backend',
|
||||
'lang' => 'en',
|
||||
'theme' => 'Backend',
|
||||
'org' => 1,
|
||||
],
|
||||
],
|
||||
],
|
||||
'socket' => [
|
||||
'master' => [
|
||||
'host' => '127.0.0.1',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user