mirror of
https://github.com/Karaka-Management/oms-Dashboard.git
synced 2026-02-13 08:58:40 +00:00
make id public, organigram impl. media password/encryption, settings bug fix, Money->FloatInt change, ...
This commit is contained in:
parent
5da9e6cd25
commit
89bb4dad4f
|
|
@ -58,7 +58,7 @@ final class BackendController extends Controller
|
||||||
->limit(1)
|
->limit(1)
|
||||||
->execute();
|
->execute();
|
||||||
|
|
||||||
if ($board instanceof NullDashboardBoard) {
|
if ($board->id === 0) {
|
||||||
/** @var \Modules\Dashboard\Models\DashboardBoard $board */
|
/** @var \Modules\Dashboard\Models\DashboardBoard $board */
|
||||||
$board = DashboardBoardMapper::get()->where('id', 1)->execute();
|
$board = DashboardBoardMapper::get()->where('id', 1)->execute();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ class DashboardBoard implements \JsonSerializable
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
public int $id = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Title.
|
* Title.
|
||||||
|
|
@ -58,7 +58,7 @@ class DashboardBoard implements \JsonSerializable
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $status = DashboardBoardStatus::ACTIVE;
|
public int $status = DashboardBoardStatus::ACTIVE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dashboard component.
|
* Dashboard component.
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class DashboardComponent implements \JsonSerializable
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected int $id = 0;
|
public int $id = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order.
|
* Order.
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$request->setData('title', 'Default Board');
|
$request->setData('title', 'Default Board');
|
||||||
|
|
||||||
$this->module->apiBoardCreate($request, $response);
|
$this->module->apiBoardCreate($request, $response);
|
||||||
self::assertGreaterThan(0, $response->get('')['response']->getId());
|
self::assertGreaterThan(0, $response->get('')['response']->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -139,7 +139,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$request->setData('module', 'TestModule');
|
$request->setData('module', 'TestModule');
|
||||||
|
|
||||||
$this->module->apiComponentCreate($request, $response);
|
$this->module->apiComponentCreate($request, $response);
|
||||||
self::assertGreaterThan(0, $response->get('')['response']->getId());
|
self::assertGreaterThan(0, $response->get('')['response']->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ final class DashboardBoardTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->board->getId());
|
self::assertEquals(0, $this->board->id);
|
||||||
self::assertEquals('', $this->board->title);
|
self::assertEquals('', $this->board->title);
|
||||||
self::assertEquals([], $this->board->getComponents());
|
self::assertEquals([], $this->board->getComponents());
|
||||||
self::assertEquals(DashboardBoardStatus::ACTIVE, $this->board->getStatus());
|
self::assertEquals(DashboardBoardStatus::ACTIVE, $this->board->getStatus());
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ final class DashboardComponentTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testDefault() : void
|
public function testDefault() : void
|
||||||
{
|
{
|
||||||
self::assertEquals(0, $this->component->getId());
|
self::assertEquals(0, $this->component->id);
|
||||||
self::assertEquals(0, $this->component->order);
|
self::assertEquals(0, $this->component->order);
|
||||||
self::assertEquals(0, $this->component->board);
|
self::assertEquals(0, $this->component->board);
|
||||||
self::assertEquals('', $this->component->module);
|
self::assertEquals('', $this->component->module);
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,6 @@ final class NullDashboardBoardTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullDashboardBoard(2);
|
$null = new NullDashboardBoard(2);
|
||||||
self::assertEquals(2, $null->getId());
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,6 @@ final class NullDashboardComponentTest extends \PHPUnit\Framework\TestCase
|
||||||
public function testId() : void
|
public function testId() : void
|
||||||
{
|
{
|
||||||
$null = new NullDashboardComponent(2);
|
$null = new NullDashboardComponent(2);
|
||||||
self::assertEquals(2, $null->getId());
|
self::assertEquals(2, $null->id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user