mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-01-23 04:58:40 +00:00
Merge remote-tracking branch 'origin/develop' into develop
# Conflicts: # Draw/Controller.js # Draw/Models/DrawType.enum.js # Draw/Models/Editor.js # Media/Models/UploadFile.php
This commit is contained in:
commit
3e8838eb94
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
namespace Modules\ProjectManagement\Admin;
|
||||
|
||||
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\ActivateAbstract;
|
||||
use phpOMS\Module\InfoManager;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class Activate extends ActivateAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function activate(Pool $dbPool, InfoManager $info)
|
||||
public static function activate(DatabasePool $dbPool, InfoManager $info)
|
||||
{
|
||||
parent::activate($dbPool, $info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
namespace Modules\ProjectManagement\Admin;
|
||||
|
||||
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\DeactivateAbstract;
|
||||
use phpOMS\Module\InfoManager;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class Deactivate extends DeactivateAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function deactivate(Pool $dbPool, InfoManager $info)
|
||||
public static function deactivate(DatabasePool $dbPool, InfoManager $info)
|
||||
{
|
||||
parent::deactivate($dbPool, $info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Modules\ProjectManagement\Admin\Install;
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
|
||||
/**
|
||||
* Navigation class.
|
||||
|
|
@ -29,7 +29,7 @@ use phpOMS\DataStorage\Database\Pool;
|
|||
*/
|
||||
class Navigation
|
||||
{
|
||||
public static function install(Pool $dbPool)
|
||||
public static function install(string $path, DatabasePool $dbPool)
|
||||
{
|
||||
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
namespace Modules\ProjectManagement\Admin;
|
||||
|
||||
use phpOMS\DataStorage\Database\DatabaseType;
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\InfoManager;
|
||||
use phpOMS\Module\InstallerAbstract;
|
||||
|
||||
|
|
@ -37,9 +37,9 @@ class Installer extends InstallerAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function install(Pool $dbPool, InfoManager $info)
|
||||
public static function install(string $path, DatabasePool $dbPool, InfoManager $info)
|
||||
{
|
||||
parent::install($dbPool, $info);
|
||||
parent::install($path, $dbPool, $info);
|
||||
|
||||
switch ($dbPool->get('core')->getType()) {
|
||||
case DatabaseType::MYSQL:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
namespace Modules\ProjectManagement\Admin;
|
||||
|
||||
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\UninstallAbstract;
|
||||
|
||||
/**
|
||||
|
|
@ -36,7 +36,7 @@ class Uninstall extends UninstallAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function uninstall(Pool $dbPool, InfoManager $info)
|
||||
public static function uninstall(DatabasePool $dbPool, InfoManager $info)
|
||||
{
|
||||
parent::uninstall($dbPool, $info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
namespace Modules\ProjectManagement\Admin;
|
||||
|
||||
|
||||
use phpOMS\DataStorage\Database\Pool;
|
||||
use phpOMS\DataStorage\Database\DatabasePool;
|
||||
use phpOMS\Module\UpdateAbstract;
|
||||
use phpOMS\System\File\Directory;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ class Update extends UpdateAbstract
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public static function update(Pool $dbPool, array $info)
|
||||
public static function update(DatabasePool $dbPool, array $info)
|
||||
{
|
||||
Directory::deletePath(__DIR__ . '/Update');
|
||||
mkdir('Update');
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -45,7 +45,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_PATH = __DIR__;
|
||||
/* public */ const MODULE_PATH = __DIR__;
|
||||
|
||||
/**
|
||||
* Module version.
|
||||
|
|
@ -53,7 +53,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_VERSION = '1.0.0';
|
||||
/* public */ const MODULE_VERSION = '1.0.0';
|
||||
|
||||
/**
|
||||
* Module name.
|
||||
|
|
@ -61,7 +61,7 @@ class Controller extends ModuleAbstract implements WebInterface
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
const MODULE_NAME = 'ProjectManagement';
|
||||
/* public */ const MODULE_NAME = 'ProjectManagement';
|
||||
|
||||
/**
|
||||
* Providing.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
namespace Modules\ProjectManagement\Models;
|
||||
|
||||
use Modules\Calendar\Models\CalendarMapper;
|
||||
use Modules\Tasks\Models\TaskMapper;
|
||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||
use phpOMS\DataStorage\Database\Query\Builder;
|
||||
use phpOMS\DataStorage\Database\Query\Column;
|
||||
|
|
@ -39,28 +38,28 @@ class ProjectMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Columns.
|
||||
*
|
||||
* @var array<string, array>
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $columns = [
|
||||
'projectmanagement_project_id' => ['name' => 'projectmanagement_project_id', 'type' => 'int', 'internal' => 'id'],
|
||||
'projectmanagement_project_name' => ['name' => 'projectmanagement_project_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'projectmanagement_project_description' => ['name' => 'projectmanagement_project_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'projectmanagement_project_calendar' => ['name' => 'projectmanagement_project_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
||||
'projectmanagement_project_costs' => ['name' => 'projectmanagement_project_costs', 'type' => 'Serializable', 'internal' => 'costs'],
|
||||
'projectmanagement_project_budget' => ['name' => 'projectmanagement_project_budget', 'type' => 'Serializable', 'internal' => 'budget'],
|
||||
'projectmanagement_project_earnings' => ['name' => 'projectmanagement_project_earnings', 'type' => 'Serializable', 'internal' => 'earnings'],
|
||||
'projectmanagement_project_start' => ['name' => 'projectmanagement_project_start', 'type' => 'DateTime', 'internal' => 'start'],
|
||||
'projectmanagement_project_end' => ['name' => 'projectmanagement_project_end', 'type' => 'DateTime', 'internal' => 'end'],
|
||||
'projectmanagement_project_name' => ['name' => 'projectmanagement_project_name', 'type' => 'string', 'internal' => 'name'],
|
||||
'projectmanagement_project_description' => ['name' => 'projectmanagement_project_description', 'type' => 'string', 'internal' => 'description'],
|
||||
'projectmanagement_project_calendar' => ['name' => 'projectmanagement_project_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
||||
'projectmanagement_project_costs' => ['name' => 'projectmanagement_project_costs', 'type' => 'Serializable', 'internal' => 'costs'],
|
||||
'projectmanagement_project_budget' => ['name' => 'projectmanagement_project_budget', 'type' => 'Serializable', 'internal' => 'budget'],
|
||||
'projectmanagement_project_earnings' => ['name' => 'projectmanagement_project_earnings', 'type' => 'Serializable', 'internal' => 'earnings'],
|
||||
'projectmanagement_project_start' => ['name' => 'projectmanagement_project_start', 'type' => 'DateTime', 'internal' => 'start'],
|
||||
'projectmanagement_project_end' => ['name' => 'projectmanagement_project_end', 'type' => 'DateTime', 'internal' => 'end'],
|
||||
];
|
||||
|
||||
/**
|
||||
* Has one relation.
|
||||
*
|
||||
* @var array<string, array>
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $hasOne = [
|
||||
protected static $ownsOne = [
|
||||
'calendar' => [
|
||||
'mapper' => CalendarMapper::class,
|
||||
'src' => 'projectmanagement_project_calendar',
|
||||
|
|
@ -70,7 +69,7 @@ class ProjectMapper extends DataMapperAbstract
|
|||
/**
|
||||
* Has many relation.
|
||||
*
|
||||
* @var array<string, array>
|
||||
* @var array
|
||||
* @since 1.0.0
|
||||
*/
|
||||
protected static $hasMany = [
|
||||
|
|
@ -109,20 +108,20 @@ class ProjectMapper extends DataMapperAbstract
|
|||
$objId = parent::create($obj, $relations);
|
||||
$query = new Builder(self::$db);
|
||||
$query->prefix(self::$db->getPrefix())
|
||||
->insert(
|
||||
'account_permission_account',
|
||||
'account_permission_from',
|
||||
'account_permission_for',
|
||||
'account_permission_id1',
|
||||
'account_permission_id2',
|
||||
'account_permission_r',
|
||||
'account_permission_w',
|
||||
'account_permission_m',
|
||||
'account_permission_d',
|
||||
'account_permission_p'
|
||||
)
|
||||
->into('account_permission')
|
||||
->values($obj->getCreatedBy(), 'calendar_project', 'calendar_project', 1, $objId, 1, 1, 1, 1, 1);
|
||||
->insert(
|
||||
'account_permission_account',
|
||||
'account_permission_from',
|
||||
'account_permission_for',
|
||||
'account_permission_id1',
|
||||
'account_permission_id2',
|
||||
'account_permission_r',
|
||||
'account_permission_w',
|
||||
'account_permission_m',
|
||||
'account_permission_d',
|
||||
'account_permission_p'
|
||||
)
|
||||
->into('account_permission')
|
||||
->values($obj->getCreatedBy(), 'calendar_project', 'calendar_project', 1, $objId, 1, 1, 1, 1, 1);
|
||||
|
||||
self::$db->con->prepare($query->toSql())->execute();
|
||||
} catch (\Exception $e) {
|
||||
|
|
@ -147,9 +146,9 @@ class ProjectMapper extends DataMapperAbstract
|
|||
public static function find(...$columns) : Builder
|
||||
{
|
||||
return parent::find(...$columns)->from('account_permission')
|
||||
->where('account_permission.account_permission_for', '=', 'calendar_project')
|
||||
->where('account_permission.account_permission_id1', '=', 1)
|
||||
->where('calendar_project.calendar_project_id', '=', new Column('account_permission.account_permission_id2'))
|
||||
->where('account_permission.account_permission_r', '=', 1);
|
||||
->where('account_permission.account_permission_for', '=', 'calendar_project')
|
||||
->where('account_permission.account_permission_id1', '=', 1)
|
||||
->where('calendar_project.calendar_project_id', '=', new Column('account_permission.account_permission_id2'))
|
||||
->where('account_permission.account_permission_r', '=', 1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -30,6 +30,6 @@ use phpOMS\Datatypes\Enum;
|
|||
*/
|
||||
abstract class ProjectResponsibility extends Enum
|
||||
{
|
||||
const MANAGER = 0;
|
||||
const OTHER = 1;
|
||||
/* public */ const MANAGER = 0;
|
||||
/* public */ const OTHER = 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
@ -30,9 +30,9 @@ use phpOMS\Datatypes\Enum;
|
|||
*/
|
||||
abstract class ProjectStatus extends Enum
|
||||
{
|
||||
const ACTIVE = 0;
|
||||
const INACTIVE = 1;
|
||||
const HOLD = 2;
|
||||
const CANCELED = 3;
|
||||
const FINISHED = 4;
|
||||
/* public */ const ACTIVE = 0;
|
||||
/* public */ const INACTIVE = 1;
|
||||
/* public */ const HOLD = 2;
|
||||
/* public */ const CANCELED = 3;
|
||||
/* public */ const FINISHED = 4;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
* PHP Version 7.1
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user