mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-02-14 22:58:41 +00:00
Bulkl path fix
This commit is contained in:
parent
c109b54bb2
commit
8d71c1d880
|
|
@ -1,44 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin;
|
|
||||||
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\ActivateAbstract;
|
|
||||||
use phpOMS\Module\InfoManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\Admin
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Activate extends ActivateAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function activate(DatabasePool $dbPool, InfoManager $info)
|
|
||||||
{
|
|
||||||
parent::activate($dbPool, $info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin;
|
|
||||||
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\DeactivateAbstract;
|
|
||||||
use phpOMS\Module\InfoManager;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\Admin
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Deactivate extends DeactivateAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function deactivate(DatabasePool $dbPool, InfoManager $info)
|
|
||||||
{
|
|
||||||
parent::deactivate($dbPool, $info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,48 +0,0 @@
|
||||||
[
|
|
||||||
{
|
|
||||||
"id": 1001701001,
|
|
||||||
"pid": "754a08ddf8bcb1cf22f310f09206dd783d42f7dd",
|
|
||||||
"type": 2,
|
|
||||||
"subtype": 1,
|
|
||||||
"name": "ProjectManagement",
|
|
||||||
"uri": "/{/lang}/backend/projectmanagement/list?{?}",
|
|
||||||
"target": "self",
|
|
||||||
"icon": null,
|
|
||||||
"order": 60,
|
|
||||||
"from": "ProjectManagement",
|
|
||||||
"permission": null,
|
|
||||||
"parent": 1003301001,
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"id": 1001702001,
|
|
||||||
"pid": "e8f8b3f93644a55dcaa84f20c2d7736fbd9ee62a",
|
|
||||||
"type": 3,
|
|
||||||
"subtype": 1,
|
|
||||||
"name": "List",
|
|
||||||
"uri": "/{/lang}/backend/projectmanagement/list?{?}",
|
|
||||||
"target": "self",
|
|
||||||
"icon": null,
|
|
||||||
"order": 1,
|
|
||||||
"from": "ProjectManagement",
|
|
||||||
"permission": null,
|
|
||||||
"parent": 1001701001,
|
|
||||||
"children": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": 1001703001,
|
|
||||||
"pid": "e8f8b3f93644a55dcaa84f20c2d7736fbd9ee62a",
|
|
||||||
"type": 3,
|
|
||||||
"subtype": 1,
|
|
||||||
"name": "Create",
|
|
||||||
"uri": "/{/lang}/backend/projectmanagement/create?{?}",
|
|
||||||
"target": "self",
|
|
||||||
"icon": null,
|
|
||||||
"order": 5,
|
|
||||||
"from": "ProjectManagement",
|
|
||||||
"permission": null,
|
|
||||||
"parent": 1001701001,
|
|
||||||
"children": []
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin\Install;
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\Admin
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Navigation
|
|
||||||
{
|
|
||||||
public static function install(string $path, DatabasePool $dbPool)
|
|
||||||
{
|
|
||||||
$navData = json_decode(file_get_contents(__DIR__ . '/Navigation.install.json'), true);
|
|
||||||
|
|
||||||
$class = '\\Modules\\Navigation\\Admin\\Installer';
|
|
||||||
/** @var $class \Modules\Navigation\Admin\Installer */
|
|
||||||
$class::installExternal($dbPool, $navData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin;
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabaseType;
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\InfoManager;
|
|
||||||
use phpOMS\Module\InstallerAbstract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Project Management install class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\ProjectManagement
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Installer extends InstallerAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function install(string $path, DatabasePool $dbPool, InfoManager $info)
|
|
||||||
{
|
|
||||||
parent::install($path, $dbPool, $info);
|
|
||||||
|
|
||||||
switch ($dbPool->get('core')->getType()) {
|
|
||||||
case DatabaseType::MYSQL:
|
|
||||||
$dbPool->get('core')->con->prepare(
|
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'projectmanagement_project` (
|
|
||||||
`projectmanagement_project_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`projectmanagement_project_name` varchar(254) NOT NULL,
|
|
||||||
`projectmanagement_project_description` text NOT NULL,
|
|
||||||
`projectmanagement_project_calendar` int(11) NOT NULL,
|
|
||||||
`projectmanagement_project_costs` int(11) NOT NULL,
|
|
||||||
`projectmanagement_project_budget` int(11) NOT NULL,
|
|
||||||
`projectmanagement_project_earnings` int(11) NOT NULL,
|
|
||||||
`projectmanagement_project_start` datetime NOT NULL,
|
|
||||||
`projectmanagement_project_end` datetime NOT NULL,
|
|
||||||
`projectmanagement_project_created_at` datetime NOT NULL,
|
|
||||||
`projectmanagement_project_created_by` int(11) NOT NULL,
|
|
||||||
PRIMARY KEY (`projectmanagement_project_id`),
|
|
||||||
KEY `projectmanagement_project_calendar` (`projectmanagement_project_calendar`),
|
|
||||||
KEY `projectmanagement_project_created_by` (`projectmanagement_project_created_by`)
|
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;'
|
|
||||||
)->execute();
|
|
||||||
|
|
||||||
$dbPool->get('core')->con->prepare(
|
|
||||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'projectmanagement_project`
|
|
||||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'projectmanagement_project_ibfk_1` FOREIGN KEY (`projectmanagement_project_calendar`) REFERENCES `' . $dbPool->get('core')->prefix . 'calendar` (`calendar_id`),
|
|
||||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'projectmanagement_project_ibfk_2` FOREIGN KEY (`projectmanagement_project_created_by`) REFERENCES `' . $dbPool->get('core')->prefix . 'account` (`account_id`);'
|
|
||||||
)->execute();
|
|
||||||
|
|
||||||
$dbPool->get('core')->con->prepare(
|
|
||||||
'CREATE TABLE if NOT EXISTS `' . $dbPool->get('core')->prefix . 'projectmanagement_task_relation` (
|
|
||||||
`projectmanagement_task_relation_id` int(11) NOT NULL AUTO_INCREMENT,
|
|
||||||
`projectmanagement_task_relation_src` int(11) NULL,
|
|
||||||
`projectmanagement_task_relation_dst` int(11) NULL,
|
|
||||||
PRIMARY KEY (`projectmanagement_task_relation_id`),
|
|
||||||
KEY `projectmanagement_task_relation_src` (`projectmanagement_task_relation_src`),
|
|
||||||
KEY `projectmanagement_task_relation_dst` (`projectmanagement_task_relation_dst`)
|
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET=utf8;'
|
|
||||||
)->execute();
|
|
||||||
|
|
||||||
$dbPool->get('core')->con->prepare(
|
|
||||||
'ALTER TABLE `' . $dbPool->get('core')->prefix . 'projectmanagement_task_relation`
|
|
||||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'projectmanagement_task_relation_ibfk_1` FOREIGN KEY (`projectmanagement_task_relation_src`) REFERENCES `' . $dbPool->get('core')->prefix . 'task` (`task_id`),
|
|
||||||
ADD CONSTRAINT `' . $dbPool->get('core')->prefix . 'projectmanagement_task_relation_ibfk_2` FOREIGN KEY (`projectmanagement_task_relation_dst`) REFERENCES `' . $dbPool->get('core')->prefix . 'projectmanagement_project` (`projectmanagement_project_id`);'
|
|
||||||
)->execute();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
use phpOMS\Router\RouteVerb;
|
|
||||||
|
|
||||||
return [
|
|
||||||
'^.*/backend/projectmanagement/list.*$' => [
|
|
||||||
[
|
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementList',
|
|
||||||
'verb' => RouteVerb::GET,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'^.*/backend/projectmanagement/create.*$' => [
|
|
||||||
[
|
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementCreate',
|
|
||||||
'verb' => RouteVerb::GET,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'^.*/backend/projectmanagement/profile.*$' => [
|
|
||||||
[
|
|
||||||
'dest' => '\Modules\ProjectManagement\Controller:viewProjectManagementProfile',
|
|
||||||
'verb' => RouteVerb::GET,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$moduleRoutes = [];
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
<?php
|
|
||||||
|
|
||||||
$moduleRoutes = [];
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin;
|
|
||||||
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\UninstallAbstract;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\Admin
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Uninstall extends UninstallAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function uninstall(DatabasePool $dbPool, InfoManager $info)
|
|
||||||
{
|
|
||||||
parent::uninstall($dbPool, $info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Admin;
|
|
||||||
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
|
||||||
use phpOMS\Module\UpdateAbstract;
|
|
||||||
use phpOMS\System\File\Directory;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Navigation class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\Admin
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Update extends UpdateAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* {@inheritdoc}
|
|
||||||
*/
|
|
||||||
public static function update(DatabasePool $dbPool, array $info)
|
|
||||||
{
|
|
||||||
Directory::deletePath(__DIR__ . '/Update');
|
|
||||||
mkdir('Update');
|
|
||||||
parent::update($dbPool, $info);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
148
Controller.php
148
Controller.php
|
|
@ -1,148 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement;
|
|
||||||
|
|
||||||
use Modules\Navigation\Models\Navigation;
|
|
||||||
use Modules\Navigation\Views\NavigationView;
|
|
||||||
use phpOMS\Contract\RenderableInterface;
|
|
||||||
use phpOMS\Message\RequestAbstract;
|
|
||||||
use phpOMS\Message\ResponseAbstract;
|
|
||||||
use phpOMS\Module\ModuleAbstract;
|
|
||||||
use phpOMS\Module\WebInterface;
|
|
||||||
use phpOMS\Views\View;
|
|
||||||
use phpOMS\Views\ViewLayout;
|
|
||||||
use Modules\ProjectManagement\Models\ProjectMapper;
|
|
||||||
use Modules\ProjectManagement\Models\Project;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Event Management controller class.
|
|
||||||
*
|
|
||||||
* @category Modules
|
|
||||||
* @package Modules\ProjectManagement
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Controller extends ModuleAbstract implements WebInterface
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module path.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
/* public */ const MODULE_PATH = __DIR__;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module version.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
/* public */ const MODULE_VERSION = '1.0.0';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Module name.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
/* public */ const MODULE_NAME = 'ProjectManagement';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Providing.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $providing = [];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Dependencies.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $dependencies = [
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param RequestAbstract $request Request
|
|
||||||
* @param ResponseAbstract $response Response
|
|
||||||
* @param mixed $data Generic data
|
|
||||||
*
|
|
||||||
* @return RenderableInterface
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function viewProjectManagementList(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
|
||||||
{
|
|
||||||
$view = new View($this->app, $request, $response);
|
|
||||||
$view->setTemplate('/Modules/ProjectManagement/Theme/Backend/projectmanagement-list');
|
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001701001, $request, $response));
|
|
||||||
|
|
||||||
$projects = ProjectMapper::getNewest(25);
|
|
||||||
$view->addData('projects', $projects);
|
|
||||||
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param RequestAbstract $request Request
|
|
||||||
* @param ResponseAbstract $response Response
|
|
||||||
* @param mixed $data Generic data
|
|
||||||
*
|
|
||||||
* @return RenderableInterface
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function viewProjectManagementCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
|
||||||
{
|
|
||||||
$view = new View($this->app, $request, $response);
|
|
||||||
$view->setTemplate('/Modules/ProjectManagement/Theme/Backend/projectmanagement-create');
|
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001701001, $request, $response));
|
|
||||||
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param RequestAbstract $request Request
|
|
||||||
* @param ResponseAbstract $response Response
|
|
||||||
* @param mixed $data Generic data
|
|
||||||
*
|
|
||||||
* @return RenderableInterface
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function viewProjectManagementProfile(RequestAbstract $request, ResponseAbstract $response, $data = null) : \Serializable
|
|
||||||
{
|
|
||||||
$view = new View($this->app, $request, $response);
|
|
||||||
$view->setTemplate('/Modules/ProjectManagement/Theme/Backend/projectmanagement-profile');
|
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1001701001, $request, $response));
|
|
||||||
|
|
||||||
$project = ProjectMapper::get((int) $request->getData('id'));
|
|
||||||
$view->addData('project', $project);
|
|
||||||
|
|
||||||
return $view;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,247 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Models;
|
|
||||||
use Modules\Calendar\Models\Calendar;
|
|
||||||
use Modules\Tasks\Models\Task;
|
|
||||||
use phpOMS\Localization\Money;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Project class.
|
|
||||||
*
|
|
||||||
* @category ProjectManager
|
|
||||||
* @package Framework
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class Project
|
|
||||||
{
|
|
||||||
private $id = 0;
|
|
||||||
|
|
||||||
private $start = null;
|
|
||||||
|
|
||||||
private $end = null;
|
|
||||||
|
|
||||||
private $name = '';
|
|
||||||
|
|
||||||
private $description = '';
|
|
||||||
|
|
||||||
private $calendar = null;
|
|
||||||
|
|
||||||
private $costs = null;
|
|
||||||
|
|
||||||
private $budget = null;
|
|
||||||
|
|
||||||
private $earnings = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created at.
|
|
||||||
*
|
|
||||||
* @var \Datetime
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private $createdAt = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by.
|
|
||||||
*
|
|
||||||
* @var int
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
private $createdBy = 0;
|
|
||||||
|
|
||||||
private $tasks = [];
|
|
||||||
|
|
||||||
public function __construct(string $name = '')
|
|
||||||
{
|
|
||||||
$this->start = new \DateTime('now');
|
|
||||||
$this->end = new \DateTime('now');
|
|
||||||
$this->end->modify('+1 month');
|
|
||||||
$this->createdAt = new \DateTime('now');
|
|
||||||
|
|
||||||
$this->calendar = new Calendar();
|
|
||||||
|
|
||||||
$this->costs = new Money();
|
|
||||||
$this->budget = new Money();
|
|
||||||
$this->earnings = new Money();
|
|
||||||
|
|
||||||
$this->setName($name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getId() : int
|
|
||||||
{
|
|
||||||
return $this->id;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function addTask(Task $task)
|
|
||||||
{
|
|
||||||
if($task->getId() !== 0) {
|
|
||||||
$this->tasks[$task->getId()] = $task;
|
|
||||||
} else {
|
|
||||||
$this->tasks[] = $task;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public function removeTask(int $id) : bool
|
|
||||||
{
|
|
||||||
if(isset($this->tasks[$id])) {
|
|
||||||
unset($this->tasks[$id]);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTask(int $id) : Task
|
|
||||||
{
|
|
||||||
return $this->tasks[$id] ?? new Task();
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getTasks() : array
|
|
||||||
{
|
|
||||||
return $this->tasks;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function countTasks() : int
|
|
||||||
{
|
|
||||||
return count($this->tasks);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getStart() : \DateTime
|
|
||||||
{
|
|
||||||
return $this->start;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setStart(\DateTime $start)
|
|
||||||
{
|
|
||||||
$this->start = $start;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setEnd(\DateTime $end)
|
|
||||||
{
|
|
||||||
$this->end = $end;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getEnd() : \DateTime
|
|
||||||
{
|
|
||||||
return $this->end;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCalendar() : Calendar
|
|
||||||
{
|
|
||||||
return $this->calendar;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getName() : string
|
|
||||||
{
|
|
||||||
return $this->name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setName(string $name)
|
|
||||||
{
|
|
||||||
$this->name = $name;
|
|
||||||
$this->calendar->setName($name);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getDescription() : string
|
|
||||||
{
|
|
||||||
return $this->description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setDescription(string $description)
|
|
||||||
{
|
|
||||||
$this->description = $description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getCosts() : Money
|
|
||||||
{
|
|
||||||
return $this->costs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getBudget() : Money
|
|
||||||
{
|
|
||||||
return $this->budget;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getEarnings() : Money
|
|
||||||
{
|
|
||||||
return $this->earnings;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setCosts(Money $costs)
|
|
||||||
{
|
|
||||||
$this->costs = $costs;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setBudget(Money $budget)
|
|
||||||
{
|
|
||||||
$this->budget = $budget;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function setEarnings(Money $earnings)
|
|
||||||
{
|
|
||||||
$this->earnings = $earnings;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \DateTime
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function getCreatedAt() : \DateTime
|
|
||||||
{
|
|
||||||
return $this->createdAt;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param \DateTime $createdAt Calendar created at
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function setCreatedAt(\DateTime $createdAt)
|
|
||||||
{
|
|
||||||
$this->createdAt = $createdAt;
|
|
||||||
$this->calendar->setCreatedAt($createdAt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function getCreatedBy() : int
|
|
||||||
{
|
|
||||||
return $this->createdBy;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param int $createdBy Creator
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public function setCreatedBy(int $createdBy)
|
|
||||||
{
|
|
||||||
$this->createdBy = $createdBy;
|
|
||||||
$this->calendar->setCreatedBy($createdBy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,171 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Models;
|
|
||||||
|
|
||||||
use Modules\Calendar\Models\CalendarMapper;
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
|
||||||
use phpOMS\DataStorage\Database\Query\Builder;
|
|
||||||
use phpOMS\DataStorage\Database\Query\Column;
|
|
||||||
use phpOMS\DataStorage\Database\RelationType;
|
|
||||||
use Modules\Tasks\Models\TaskMapper;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mapper class.
|
|
||||||
*
|
|
||||||
* @category Calendar
|
|
||||||
* @package Modules
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
class ProjectMapper extends DataMapperAbstract
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Columns.
|
|
||||||
*
|
|
||||||
* @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_created_by' => ['name' => 'projectmanagement_project_created_by', 'type' => 'int', 'internal' => 'createdBy'],
|
|
||||||
'projectmanagement_project_created_at' => ['name' => 'projectmanagement_project_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Has many relation.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $hasMany = [
|
|
||||||
'tasks' => [
|
|
||||||
'mapper' => TaskMapper::class,
|
|
||||||
'table' => 'projectmanagement_task_relation',
|
|
||||||
'dst' => 'projectmanagement_task_relation_dst',
|
|
||||||
'src' => 'projectmanagement_task_relation_src',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Has one relation.
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $ownsOne = [
|
|
||||||
'calendar' => [
|
|
||||||
'mapper' => CalendarMapper::class,
|
|
||||||
'src' => 'projectmanagement_project_calendar',
|
|
||||||
],
|
|
||||||
];
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Primary table.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $table = 'projectmanagement_project';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created at.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $createdAt = 'projectmanagement_project_created_at';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Primary field name.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
protected static $primaryField = 'projectmanagement_project_id';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create object.
|
|
||||||
*
|
|
||||||
* @param mixed $obj Object
|
|
||||||
* @param int $relations Behavior for relations creation
|
|
||||||
*
|
|
||||||
* @return mixed
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
public static function create($obj, int $relations = RelationType::ALL)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$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);
|
|
||||||
|
|
||||||
self::$db->con->prepare($query->toSql())->execute();
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
var_dump($e->getMessage());
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $objId;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find.
|
|
||||||
*
|
|
||||||
* @param array $columns Columns to select
|
|
||||||
*
|
|
||||||
* @return Builder
|
|
||||||
*
|
|
||||||
* @since 1.0.0
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
*/
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Models;
|
|
||||||
|
|
||||||
use phpOMS\Datatypes\Enum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Task type enum.
|
|
||||||
*
|
|
||||||
* @category Tasks
|
|
||||||
* @package Modules
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class ProjectResponsibility extends Enum
|
|
||||||
{
|
|
||||||
/* public */ const MANAGER = 0;
|
|
||||||
/* public */ const OTHER = 1;
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
namespace Modules\ProjectManagement\Models;
|
|
||||||
|
|
||||||
use phpOMS\Datatypes\Enum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Task type enum.
|
|
||||||
*
|
|
||||||
* @category Tasks
|
|
||||||
* @package Modules
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
* @since 1.0.0
|
|
||||||
*/
|
|
||||||
abstract class ProjectStatus extends Enum
|
|
||||||
{
|
|
||||||
/* public */ const ACTIVE = 0;
|
|
||||||
/* public */ const INACTIVE = 1;
|
|
||||||
/* public */ const HOLD = 2;
|
|
||||||
/* public */ const CANCELED = 3;
|
|
||||||
/* public */ const FINISHED = 4;
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
return ['Navigation' => [
|
|
||||||
'ProjectManagement' => 'Project Management',
|
|
||||||
]];
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
$MODLANG[1] = [
|
|
||||||
];
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
return ['ProjectManagement' => [
|
|
||||||
'Active' => 'Active',
|
|
||||||
'Budget' => 'Budget',
|
|
||||||
'Canceled' => 'Canceled',
|
|
||||||
'Created' => 'Created',
|
|
||||||
'Creator' => 'Creator',
|
|
||||||
'Description' => 'Description',
|
|
||||||
'End' => 'End',
|
|
||||||
'Files' => 'Files',
|
|
||||||
'Finished' => 'Finished',
|
|
||||||
'Hold' => 'Hold',
|
|
||||||
'Inactive' => 'Inactive',
|
|
||||||
'Manager' => 'Manager',
|
|
||||||
'Name' => 'Name',
|
|
||||||
'Other' => 'Other',
|
|
||||||
'Project' => 'Project',
|
|
||||||
'Projects' => 'Projects',
|
|
||||||
'Responsibility' => 'Responsibility',
|
|
||||||
'Start' => 'Start',
|
|
||||||
'Status' => 'Status',
|
|
||||||
'Title' => 'Title',
|
|
||||||
'UserGroup' => 'User/Group',
|
|
||||||
]];
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1><?= $this->getText('Project'); ?></h1></header>
|
|
||||||
<div class="inner">
|
|
||||||
<form>
|
|
||||||
<table class="layout wf-100">
|
|
||||||
<tr><td colspan="3"><label for="iName"><?= $this->getText('Name'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="" required><td>
|
|
||||||
<tr><td colspan="3"><label for="iDescription"><?= $this->getText('Description'); ?></label>
|
|
||||||
<tr><td colspan="2"><textarea id="iDescription" name="description"></textarea><td>
|
|
||||||
<tr><td colspan="3"><label for="iStatus"><?= $this->getText('Status'); ?></label>
|
|
||||||
<tr><td colspan="2"><select id="iStatus" name="status">
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::ACTIVE ?>"><?= $this->getText('Active'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::INACTIVE ?>"><?= $this->getText('Inactive'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::FINISHED ?>"><?= $this->getText('Finished'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::CANCELED ?>"><?= $this->getText('Canceled'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::HOLD ?>"><?= $this->getText('Hold'); ?>
|
|
||||||
</select><td>
|
|
||||||
<tr><td colspan="3"><label for="iFiles"><?= $this->getText('Files'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
|
|
||||||
<tr><td colspan="3"><label for="iBudget"><?= $this->getText('Budget'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder=""><td>
|
|
||||||
<tr><td><label for="iDue"><?= $this->getText('Start'); ?></label><td><label for="iDue"><?= $this->getText('Due'); ?></label><td>
|
|
||||||
<tr><td><input type="datetime-local" id="iDue" name="due"><td><input type="datetime-local" id="iDue" name="due"><td>
|
|
||||||
<tr><td><label for="iResponsibility"><?= $this->getText('Responsibility'); ?></label><td><label for="iUser"><?= $this->getText('UserGroup'); ?></label><td>
|
|
||||||
<tr><td><select id="iStatus" name="status">
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectResponsibility::MANAGER ?>"><?= $this->getText('Manager'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectResponsibility::OTHER ?>"><?= $this->getText('Other'); ?>
|
|
||||||
</select>
|
|
||||||
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
|
|
||||||
<tr><td colspan="3"><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
|
||||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
|
||||||
$footerView->setPages(20);
|
|
||||||
$footerView->setPage(1);
|
|
||||||
|
|
||||||
$list = $this->getData('projects');
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="box wf-100">
|
|
||||||
<table class="table">
|
|
||||||
<caption><?= $this->getText('Projects') ?></caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
|
||||||
<td><?= $this->getText('Start'); ?>
|
|
||||||
<td><?= $this->getText('Due'); ?>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="5"><?= $footerView->render(); ?>
|
|
||||||
<tbody>
|
|
||||||
<?php $count = 0; foreach($list as $key => $value) : $count++;
|
|
||||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/projectmanagement/profile?{?}&id=' . $value->getId());?>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getStart()->format('Y-m-d'); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getEnd()->format('Y-m-d'); ?></a>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if($count === 0) : ?>
|
|
||||||
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
$project = $this->getData('project');
|
|
||||||
$tasks = $project->getTasks();
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1><?= $project->getName(); ?></h1></header>
|
|
||||||
<div class="inner">
|
|
||||||
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/projectmanagement?{?}&csrf={$CSRF}'); ?>">
|
|
||||||
<table class="layout wf-100">
|
|
||||||
<tbody>
|
|
||||||
<tr><td colspan="2"><label for="iName"><?= $this->getText('Name'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder=" Name" value="<?= $project->getName(); ?>" required>
|
|
||||||
<tr><td><label for="iStart"><?= $this->getText('Start'); ?></label>
|
|
||||||
<td><label for="iEnd"><?= $this->getText('End'); ?></label>
|
|
||||||
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $project->getStart()->format('Y-m-d\TH:i:s'); ?>">
|
|
||||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $project->getEnd()->format('Y-m-d\TH:i:s'); ?>">
|
|
||||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getText('Description'); ?></label>
|
|
||||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= $project->getDescription(); ?></textarea>
|
|
||||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getText('Save', 0, 0); ?>">
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<div class="box wf-100">
|
|
||||||
<table class="table">
|
|
||||||
<caption><?= $this->getText('Tasks', 'Tasks'); ?></caption>
|
|
||||||
<thead>
|
|
||||||
<td><?= $this->getText('Status'); ?>
|
|
||||||
<td><?= $this->getText('Due', 'Tasks'); ?>
|
|
||||||
<td class="full"><?= $this->getText('Title'); ?>
|
|
||||||
<tfoot>
|
|
||||||
<tbody>
|
|
||||||
<?php $c = 0; foreach($tasks as $key => $task) : $c++;
|
|
||||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/task/single?{?}&id=' . $task->getId());
|
|
||||||
$color = 'darkred';
|
|
||||||
if($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
|
|
||||||
<tr>
|
|
||||||
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('S' . $task->getStatus(), 'Tasks'); ?></span></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>
|
|
||||||
<?php endforeach; if($c == 0) : ?>
|
|
||||||
<tr><td colspan="6" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Calendar</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Media</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Finances</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
return ['Navigation' => [
|
|
||||||
'ProjectManagement' => 'Project Management',
|
|
||||||
]];
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
$MODLANG[1] = [
|
|
||||||
];
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
return ['ProjectManagement' => [
|
|
||||||
'Active' => 'Active',
|
|
||||||
'Budget' => 'Budget',
|
|
||||||
'Canceled' => 'Canceled',
|
|
||||||
'Created' => 'Created',
|
|
||||||
'Creator' => 'Creator',
|
|
||||||
'Description' => 'Description',
|
|
||||||
'End' => 'End',
|
|
||||||
'Files' => 'Files',
|
|
||||||
'Finished' => 'Finished',
|
|
||||||
'Hold' => 'Hold',
|
|
||||||
'Inactive' => 'Inactive',
|
|
||||||
'Manager' => 'Manager',
|
|
||||||
'Name' => 'Name',
|
|
||||||
'Other' => 'Other',
|
|
||||||
'Project' => 'Project',
|
|
||||||
'Projects' => 'Projects',
|
|
||||||
'Responsibility' => 'Responsibility',
|
|
||||||
'Start' => 'Start',
|
|
||||||
'Status' => 'Status',
|
|
||||||
'Title' => 'Title',
|
|
||||||
'UserGroup' => 'User/Group',
|
|
||||||
]];
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1><?= $this->getText('Project'); ?></h1></header>
|
|
||||||
<div class="inner">
|
|
||||||
<form>
|
|
||||||
<table class="layout wf-100">
|
|
||||||
<tr><td colspan="3"><label for="iName"><?= $this->getText('Name'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder="" required><td>
|
|
||||||
<tr><td colspan="3"><label for="iDescription"><?= $this->getText('Description'); ?></label>
|
|
||||||
<tr><td colspan="2"><textarea id="iDescription" name="description"></textarea><td>
|
|
||||||
<tr><td colspan="3"><label for="iStatus"><?= $this->getText('Status'); ?></label>
|
|
||||||
<tr><td colspan="2"><select id="iStatus" name="status">
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::ACTIVE ?>"><?= $this->getText('Active'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::INACTIVE ?>"><?= $this->getText('Inactive'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::FINISHED ?>"><?= $this->getText('Finished'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::CANCELED ?>"><?= $this->getText('Canceled'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectStatus::HOLD ?>"><?= $this->getText('Hold'); ?>
|
|
||||||
</select><td>
|
|
||||||
<tr><td colspan="3"><label for="iFiles"><?= $this->getText('Files'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="file" id="iFiles" name="file" multiple><td>
|
|
||||||
<tr><td colspan="3"><label for="iBudget"><?= $this->getText('Budget'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iBudget" name="budget" placeholder=""><td>
|
|
||||||
<tr><td><label for="iDue"><?= $this->getText('Start'); ?></label><td><label for="iDue"><?= $this->getText('Due'); ?></label><td>
|
|
||||||
<tr><td><input type="datetime-local" id="iDue" name="due"><td><input type="datetime-local" id="iDue" name="due"><td>
|
|
||||||
<tr><td><label for="iResponsibility"><?= $this->getText('Responsibility'); ?></label><td><label for="iUser"><?= $this->getText('UserGroup'); ?></label><td>
|
|
||||||
<tr><td><select id="iStatus" name="status">
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectResponsibility::MANAGER ?>"><?= $this->getText('Manager'); ?>
|
|
||||||
<option value="<?= \Modules\ProjectManagement\Models\ProjectResponsibility::OTHER ?>"><?= $this->getText('Other'); ?>
|
|
||||||
</select>
|
|
||||||
<td><span class="input"><button type="button" formaction=""><i class="fa fa-book"></i></button><input type="text" id="iUser" name="user" placeholder=""></span><td><button><?= $this->getText('Add', 0, 0); ?></button>
|
|
||||||
<tr><td colspan="3"><input type="submit" value="<?= $this->getText('Create', 0, 0); ?>">
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,52 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
|
|
||||||
$footerView = new \Web\Views\Lists\PaginationView($this->app, $this->request, $this->response);
|
|
||||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
|
||||||
$footerView->setPages(20);
|
|
||||||
$footerView->setPage(1);
|
|
||||||
|
|
||||||
$list = $this->getData('projects');
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12">
|
|
||||||
<div class="box wf-100">
|
|
||||||
<table class="table">
|
|
||||||
<caption><?= $this->getText('Projects') ?></caption>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<td class="wf-100"><?= $this->getText('Title'); ?>
|
|
||||||
<td><?= $this->getText('Start'); ?>
|
|
||||||
<td><?= $this->getText('Due'); ?>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<td colspan="5"><?= $footerView->render(); ?>
|
|
||||||
<tbody>
|
|
||||||
<?php $count = 0; foreach($list as $key => $value) : $count++;
|
|
||||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/projectmanagement/profile?{?}&id=' . $value->getId());?>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getName(); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getStart()->format('Y-m-d'); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $value->getEnd()->format('Y-m-d'); ?></a>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
<?php if($count === 0) : ?>
|
|
||||||
<tr><td colspan="5" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
@ -1,94 +0,0 @@
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* Orange Management
|
|
||||||
*
|
|
||||||
* PHP Version 7.1
|
|
||||||
*
|
|
||||||
* @category TBD
|
|
||||||
* @package TBD
|
|
||||||
* @author OMS Development Team <dev@oms.com>
|
|
||||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
|
||||||
* @copyright Dennis Eichhorn
|
|
||||||
* @license OMS License 1.0
|
|
||||||
* @version 1.0.0
|
|
||||||
* @link http://orange-management.com
|
|
||||||
*/
|
|
||||||
$project = $this->getData('project');
|
|
||||||
$tasks = $project->getTasks();
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1><?= $project->getName(); ?></h1></header>
|
|
||||||
<div class="inner">
|
|
||||||
<form id="fProject" method="POST" action="<?= \phpOMS\Uri\UriFactory::build('/{/lang}/api/projectmanagement?{?}&csrf={$CSRF}'); ?>">
|
|
||||||
<table class="layout wf-100">
|
|
||||||
<tbody>
|
|
||||||
<tr><td colspan="2"><label for="iName"><?= $this->getText('Name'); ?></label>
|
|
||||||
<tr><td colspan="2"><input type="text" id="iName" name="name" placeholder=" Name" value="<?= $project->getName(); ?>" required>
|
|
||||||
<tr><td><label for="iStart"><?= $this->getText('Start'); ?></label>
|
|
||||||
<td><label for="iEnd"><?= $this->getText('End'); ?></label>
|
|
||||||
<tr><td><input type="datetime-local" id="iStart" name="start" value="<?= $project->getStart()->format('Y-m-d\TH:i:s'); ?>">
|
|
||||||
<td><input type="datetime-local" id="iEnd" name="end" value="<?= $project->getEnd()->format('Y-m-d\TH:i:s'); ?>">
|
|
||||||
<tr><td colspan="2"><label for="iDescription"><?= $this->getText('Description'); ?></label>
|
|
||||||
<tr><td colspan="2"><textarea id="iDescription" name="desc"><?= $project->getDescription(); ?></textarea>
|
|
||||||
<tr><td colspan="2"><input type="submit" value="<?= $this->getText('Save', 0, 0); ?>">
|
|
||||||
</table>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<div class="box wf-100">
|
|
||||||
<table class="table">
|
|
||||||
<caption><?= $this->getText('Tasks', 'Tasks'); ?></caption>
|
|
||||||
<thead>
|
|
||||||
<td><?= $this->getText('Status'); ?>
|
|
||||||
<td><?= $this->getText('Due', 'Tasks'); ?>
|
|
||||||
<td class="full"><?= $this->getText('Title'); ?>
|
|
||||||
<tfoot>
|
|
||||||
<tbody>
|
|
||||||
<?php $c = 0; foreach($tasks as $key => $task) : $c++;
|
|
||||||
$url = \phpOMS\Uri\UriFactory::build('/{/lang}/backend/task/single?{?}&id=' . $task->getId());
|
|
||||||
$color = 'darkred';
|
|
||||||
if($task->getStatus() === \Modules\Tasks\Models\TaskStatus::DONE) { $color = 'green'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::OPEN) { $color = 'darkblue'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::WORKING) { $color = 'purple'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::CANCELED) { $color = 'red'; }
|
|
||||||
elseif($task->getStatus() === \Modules\Tasks\Models\TaskStatus::SUSPENDED) { $color = 'yellow'; } ;?>
|
|
||||||
<tr>
|
|
||||||
<td><a href="<?= $url; ?>"><span class="tag <?= $color; ?>"><?= $this->getText('S' . $task->getStatus(), 'Tasks'); ?></span></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $task->getDue()->format('Y-m-d H:i'); ?></a>
|
|
||||||
<td><a href="<?= $url; ?>"><?= $task->getTitle(); ?></a>
|
|
||||||
<?php endforeach; if($c == 0) : ?>
|
|
||||||
<tr><td colspan="6" class="empty"><?= $this->getText('Empty', 0, 0); ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Calendar</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Media</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-md-6">
|
|
||||||
<section class="box wf-100">
|
|
||||||
<header><h1>Finances</h1></header>
|
|
||||||
</section>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 48 KiB |
46
info.json
46
info.json
|
|
@ -1,46 +0,0 @@
|
||||||
{
|
|
||||||
"name": {
|
|
||||||
"id": 1001700000,
|
|
||||||
"internal": "ProjectManagement",
|
|
||||||
"external": "OMS Project Management"
|
|
||||||
},
|
|
||||||
"version": "1.0.0",
|
|
||||||
"requirements": {
|
|
||||||
"phpOMS": "1.0.0",
|
|
||||||
"phpOMS-db": "1.0.0"
|
|
||||||
},
|
|
||||||
"creator": {
|
|
||||||
"name": "Orange Management",
|
|
||||||
"website": "www.spl1nes.com"
|
|
||||||
},
|
|
||||||
"description": "Project Management module.",
|
|
||||||
"directory": "ProjectManagement",
|
|
||||||
"dependencies": {
|
|
||||||
"Admin" : "1.0.0",
|
|
||||||
"Calendar" : "1.0.0",
|
|
||||||
"Tasks" : "1.0.0"
|
|
||||||
},
|
|
||||||
"providing": {
|
|
||||||
"Navigation": "*"
|
|
||||||
},
|
|
||||||
"load": [
|
|
||||||
{
|
|
||||||
"pid": [
|
|
||||||
"e8f8b3f93644a55dcaa84f20c2d7736fbd9ee62a"
|
|
||||||
],
|
|
||||||
"type": 4,
|
|
||||||
"for": "Content",
|
|
||||||
"from": "ProjectManagement",
|
|
||||||
"file": "ProjectManagement"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"pid": [
|
|
||||||
"754a08ddf8bcb1cf22f310f09206dd783d42f7dd"
|
|
||||||
],
|
|
||||||
"type": 5,
|
|
||||||
"from": "ProjectManagement",
|
|
||||||
"for": "Navigation",
|
|
||||||
"file": "Navigation"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user