mirror of
https://github.com/Karaka-Management/oms-ProjectManagement.git
synced 2026-02-14 06:38:40 +00:00
phpcs fixes
This commit is contained in:
parent
f715c7363f
commit
dfb15ac655
|
|
@ -19,6 +19,11 @@
|
||||||
"type": "TEXT",
|
"type": "TEXT",
|
||||||
"null": true
|
"null": true
|
||||||
},
|
},
|
||||||
|
"projectmanagement_project_description_raw": {
|
||||||
|
"name": "projectmanagement_project_description_raw",
|
||||||
|
"type": "TEXT",
|
||||||
|
"null": true
|
||||||
|
},
|
||||||
"projectmanagement_project_calendar": {
|
"projectmanagement_project_calendar": {
|
||||||
"name": "projectmanagement_project_calendar",
|
"name": "projectmanagement_project_calendar",
|
||||||
"type": "INT",
|
"type": "INT",
|
||||||
|
|
|
||||||
27
Models/NullProject.php
Normal file
27
Models/NullProject.php
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Orange Management
|
||||||
|
*
|
||||||
|
* PHP Version 7.4
|
||||||
|
*
|
||||||
|
* @package Modules\ProjectManagement\Models
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace Modules\ProjectManagement\Models;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Null model
|
||||||
|
*
|
||||||
|
* @package Modules\ProjectManagement\Models
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @link https://orange-management.org
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
final class NullProject extends Employee
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -28,37 +28,133 @@ use phpOMS\Localization\Money;
|
||||||
*/
|
*/
|
||||||
class Project
|
class Project
|
||||||
{
|
{
|
||||||
private $id = 0;
|
/**
|
||||||
|
* ID.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private int $id = 0;
|
||||||
|
|
||||||
private $start = null;
|
/**
|
||||||
|
* Start date.
|
||||||
|
*
|
||||||
|
* @var \DateTime
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private \DateTime $start;
|
||||||
|
|
||||||
private $end = null;
|
/**
|
||||||
|
* End date.
|
||||||
|
*
|
||||||
|
* @var \DateTime
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private \DateTime $end;
|
||||||
|
|
||||||
private $name = '';
|
/**
|
||||||
|
* Estimated end date.
|
||||||
|
*
|
||||||
|
* @var \DateTime
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private \DateTime $endEstimated;
|
||||||
|
|
||||||
private $description = '';
|
/**
|
||||||
|
* Project name.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private string $name = '';
|
||||||
|
|
||||||
private $calendar = null;
|
/**
|
||||||
|
* Project description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private string $description = '';
|
||||||
|
|
||||||
private $costs = null;
|
/**
|
||||||
|
* Project raw description.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private string $descriptionRaw = '';
|
||||||
|
|
||||||
private $budget = null;
|
/**
|
||||||
|
* Calendar.
|
||||||
|
*
|
||||||
|
* @var Calendar
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private Calendar $calendar;
|
||||||
|
|
||||||
private $earnings = null;
|
/**
|
||||||
|
* Current total costs.
|
||||||
|
*
|
||||||
|
* @var Money
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private Money $costs;
|
||||||
|
|
||||||
private $progress = 0;
|
/**
|
||||||
|
* Budget costs.
|
||||||
|
*
|
||||||
|
* @var Money
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private Money $budgetCosts;
|
||||||
|
|
||||||
private $progressType = ProgressType::MANUAL;
|
/**
|
||||||
|
* Budget earnings.
|
||||||
|
*
|
||||||
|
* @var Money
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private Money $budgetEarnings;
|
||||||
|
|
||||||
private $media = [];
|
/**
|
||||||
|
* Current total earnings.
|
||||||
|
*
|
||||||
|
* @var Money
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private Money $earnings;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Progress percentage.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private int $progress = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Progress calculation.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private int $progressType = ProgressType::MANUAL;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Media files.
|
||||||
|
*
|
||||||
|
* @var Media[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
private array $media = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var null|\DateTime
|
* @var \DateTime
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?\DateTime $createdAt = null;
|
private \DateTime $createdAt;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by.
|
* Created by.
|
||||||
|
|
@ -68,14 +164,29 @@ class Project
|
||||||
*/
|
*/
|
||||||
private $createdBy = 0;
|
private $createdBy = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tasks.
|
||||||
|
*
|
||||||
|
* @var Tasks[]
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
private $tasks = [];
|
private $tasks = [];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor.
|
||||||
|
*
|
||||||
|
* @param string $name Name of the project
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function __construct(string $name = '')
|
public function __construct(string $name = '')
|
||||||
{
|
{
|
||||||
$this->start = new \DateTime('now');
|
$this->start = new \DateTime('now');
|
||||||
$this->end = new \DateTime('now');
|
$this->end = new \DateTime('now');
|
||||||
$this->end->modify('+1 month');
|
$this->end->modify('+1 month');
|
||||||
$this->createdAt = new \DateTime('now');
|
|
||||||
|
$this->estimatedEnd = clone $this->end;
|
||||||
|
$this->createdAt = new \DateTime('now');
|
||||||
|
|
||||||
$this->calendar = new Calendar();
|
$this->calendar = new Calendar();
|
||||||
|
|
||||||
|
|
@ -86,21 +197,77 @@ class Project
|
||||||
$this->setName($name);
|
$this->setName($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get id.
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMedia() : array
|
/**
|
||||||
|
* Get all media files.
|
||||||
|
*
|
||||||
|
* @return Media[]
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getMedias() : array
|
||||||
{
|
{
|
||||||
return $this->media;
|
return $this->media;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add media
|
||||||
|
*
|
||||||
|
* @param int|Media $media Media
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function addMedia($media) : void
|
public function addMedia($media) : void
|
||||||
{
|
{
|
||||||
$this->media[] = $media;
|
if ($media->getId() !== 0) {
|
||||||
|
$this->media[$media->getId()] = $media;
|
||||||
|
} else {
|
||||||
|
$this->media[] = $media;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove media
|
||||||
|
*
|
||||||
|
* @param int $id Media id
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function removeMedia(int $id) : bool
|
||||||
|
{
|
||||||
|
if (isset($this->media[$id])) {
|
||||||
|
unset($this->media[$id]);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add task
|
||||||
|
*
|
||||||
|
* @param int|Task $task Task
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function addTask(Task $task) : void
|
public function addTask(Task $task) : void
|
||||||
{
|
{
|
||||||
if ($task->getId() !== 0) {
|
if ($task->getId() !== 0) {
|
||||||
|
|
@ -110,6 +277,15 @@ class Project
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove task
|
||||||
|
*
|
||||||
|
* @param int $id Task id
|
||||||
|
*
|
||||||
|
* @return bool
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function removeTask(int $id) : bool
|
public function removeTask(int $id) : bool
|
||||||
{
|
{
|
||||||
if (isset($this->tasks[$id])) {
|
if (isset($this->tasks[$id])) {
|
||||||
|
|
@ -121,118 +297,398 @@ class Project
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get progress
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getProgress() : int
|
public function getProgress() : int
|
||||||
{
|
{
|
||||||
return $this->progress;
|
return $this->progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set progress
|
||||||
|
*
|
||||||
|
* @param int $progress Progress
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setProgress(int $progress) : void
|
public function setProgress(int $progress) : void
|
||||||
{
|
{
|
||||||
$this->progress = $progress;
|
$this->progress = $progress;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get progress type
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getProgressType() : int
|
public function getProgressType() : int
|
||||||
{
|
{
|
||||||
return $this->progressType;
|
return $this->progressType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set progress type
|
||||||
|
*
|
||||||
|
* @param int $type Progress type
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setProgressType(int $type) : void
|
public function setProgressType(int $type) : void
|
||||||
{
|
{
|
||||||
$this->progressType = $type;
|
$this->progressType = $type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get task
|
||||||
|
*
|
||||||
|
* @param int $id Task id
|
||||||
|
*
|
||||||
|
* @return Task
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTask(int $id) : Task
|
public function getTask(int $id) : Task
|
||||||
{
|
{
|
||||||
return $this->tasks[$id] ?? new Task();
|
return $this->tasks[$id] ?? new Task();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get media
|
||||||
|
*
|
||||||
|
* @param int $id Media id
|
||||||
|
*
|
||||||
|
* @return Media
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getMedia(int $id) : Media
|
||||||
|
{
|
||||||
|
return $this->media[$id] ?? new Task();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get tasks
|
||||||
|
*
|
||||||
|
* @return Task[]
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getTasks() : array
|
public function getTasks() : array
|
||||||
{
|
{
|
||||||
return $this->tasks;
|
return $this->tasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count tasks
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function countTasks() : int
|
public function countTasks() : int
|
||||||
{
|
{
|
||||||
return \count($this->tasks);
|
return \count($this->tasks);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count media
|
||||||
|
*
|
||||||
|
* @return int
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function countMedia() : int
|
||||||
|
{
|
||||||
|
return \count($this->media);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get start date
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getStart() : \DateTime
|
public function getStart() : \DateTime
|
||||||
{
|
{
|
||||||
return $this->start;
|
return $this->start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set start date
|
||||||
|
*
|
||||||
|
* @param \DateTime $start Start date
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setStart(\DateTime $start) : void
|
public function setStart(\DateTime $start) : void
|
||||||
{
|
{
|
||||||
$this->start = $start;
|
$this->start = $start;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set end date
|
||||||
|
*
|
||||||
|
* @param \DateTime $end End date
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setEnd(\DateTime $end) : void
|
public function setEnd(\DateTime $end) : void
|
||||||
{
|
{
|
||||||
$this->end = $end;
|
$this->end = $end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get end date
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getEnd() : \DateTime
|
public function getEnd() : \DateTime
|
||||||
{
|
{
|
||||||
return $this->end;
|
return $this->end;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set estimated end date
|
||||||
|
*
|
||||||
|
* @param \DateTime $end End date
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setEstimatedEnd(\DateTime $end) : void
|
||||||
|
{
|
||||||
|
$this->end = $end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get estimated end date
|
||||||
|
*
|
||||||
|
* @return \DateTime
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getEstimatedEnd() : \DateTime
|
||||||
|
{
|
||||||
|
return $this->end;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get calendar
|
||||||
|
*
|
||||||
|
* @return Calendar
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getCalendar() : Calendar
|
public function getCalendar() : Calendar
|
||||||
{
|
{
|
||||||
return $this->calendar;
|
return $this->calendar;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get name
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getName() : string
|
public function getName() : string
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set name
|
||||||
|
*
|
||||||
|
* @param string $name Project name
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setName(string $name) : void
|
public function setName(string $name) : void
|
||||||
{
|
{
|
||||||
$this->name = $name;
|
$this->name = $name;
|
||||||
$this->calendar->setName($name);
|
$this->calendar->setName($name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function getDescription() : string
|
public function getDescription() : string
|
||||||
{
|
{
|
||||||
return $this->description;
|
return $this->description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Description
|
||||||
|
*
|
||||||
|
* @param string $description Description
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setDescription(string $description) : void
|
public function setDescription(string $description) : void
|
||||||
{
|
{
|
||||||
$this->description = $description;
|
$this->description = $description;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get description
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function getDescriptionRaw() : string
|
||||||
|
{
|
||||||
|
return $this->descriptionRaw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Description
|
||||||
|
*
|
||||||
|
* @param string $description Description
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setDescriptionRaw(string $description) : void
|
||||||
|
{
|
||||||
|
$this->descriptionRaw = $description;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get costs
|
||||||
|
*
|
||||||
|
* @return Money
|
||||||
|
*
|
||||||
|
* @sicne 1.0.0
|
||||||
|
*/
|
||||||
public function getCosts() : Money
|
public function getCosts() : Money
|
||||||
{
|
{
|
||||||
return $this->costs;
|
return $this->costs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getBudget() : Money
|
/**
|
||||||
|
* Get budget costs
|
||||||
|
*
|
||||||
|
* @return Money
|
||||||
|
*
|
||||||
|
* @sicne 1.0.0
|
||||||
|
*/
|
||||||
|
public function getBudgetCosts() : Money
|
||||||
{
|
{
|
||||||
return $this->budget;
|
return $this->budgetCosts;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get budget earnings
|
||||||
|
*
|
||||||
|
* @return Money
|
||||||
|
*
|
||||||
|
* @sicne 1.0.0
|
||||||
|
*/
|
||||||
|
public function getBudgetEarnings() : Money
|
||||||
|
{
|
||||||
|
return $this->budgetEarnings;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get earnings
|
||||||
|
*
|
||||||
|
* @return Money
|
||||||
|
*
|
||||||
|
* @sicne 1.0.0
|
||||||
|
*/
|
||||||
public function getEarnings() : Money
|
public function getEarnings() : Money
|
||||||
{
|
{
|
||||||
return $this->earnings;
|
return $this->earnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set costs
|
||||||
|
*
|
||||||
|
* @param Money $costs Costs
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setCosts(Money $costs) : void
|
public function setCosts(Money $costs) : void
|
||||||
{
|
{
|
||||||
$this->costs = $costs;
|
$this->costs = $costs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setBudget(Money $budget) : void
|
/**
|
||||||
|
* Set budget costs
|
||||||
|
*
|
||||||
|
* @param Money $budget Budget
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setBudgetCosts(Money $budget) : void
|
||||||
{
|
{
|
||||||
$this->budget = $budget;
|
$this->budgetCosts = $budget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set budget earnings
|
||||||
|
*
|
||||||
|
* @param Money $budget Budget
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function setBudgetEarnings(Money $budget) : void
|
||||||
|
{
|
||||||
|
$this->budgetEarnings = $budget;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set earnings
|
||||||
|
*
|
||||||
|
* @param Money $earnings Earnings
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
public function setEarnings(Money $earnings) : void
|
public function setEarnings(Money $earnings) : void
|
||||||
{
|
{
|
||||||
$this->earnings = $earnings;
|
$this->earnings = $earnings;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get created at
|
||||||
|
*
|
||||||
* @return \DateTime
|
* @return \DateTime
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
@ -243,6 +699,8 @@ class Project
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Get created by
|
||||||
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
|
|
@ -253,7 +711,9 @@ class Project
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $createdBy Creator
|
* Set created by
|
||||||
|
*
|
||||||
|
* @param int $createdBy Creator
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -37,19 +37,22 @@ final class ProjectMapper extends DataMapperAbstract
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static array $columns = [
|
protected static array $columns = [
|
||||||
'projectmanagement_project_id' => ['name' => 'projectmanagement_project_id', 'type' => 'int', 'internal' => 'id'],
|
'projectmanagement_project_id' => ['name' => 'projectmanagement_project_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'projectmanagement_project_name' => ['name' => 'projectmanagement_project_name', 'type' => 'string', 'internal' => 'name'],
|
'projectmanagement_project_name' => ['name' => 'projectmanagement_project_name', 'type' => 'string', 'internal' => 'name'],
|
||||||
'projectmanagement_project_description' => ['name' => 'projectmanagement_project_description', 'type' => 'string', 'internal' => 'description'],
|
'projectmanagement_project_description' => ['name' => 'projectmanagement_project_description', 'type' => 'string', 'internal' => 'description'],
|
||||||
'projectmanagement_project_calendar' => ['name' => 'projectmanagement_project_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
'projectmanagement_project_description_raw' => ['name' => 'projectmanagement_project_description_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||||
'projectmanagement_project_costs' => ['name' => 'projectmanagement_project_costs', 'type' => 'Serializable', 'internal' => 'costs'],
|
'projectmanagement_project_calendar' => ['name' => 'projectmanagement_project_calendar', 'type' => 'int', 'internal' => 'calendar'],
|
||||||
'projectmanagement_project_budget' => ['name' => 'projectmanagement_project_budget', 'type' => 'Serializable', 'internal' => 'budget'],
|
'projectmanagement_project_costs' => ['name' => 'projectmanagement_project_costs', 'type' => 'Serializable', 'internal' => 'costs'],
|
||||||
'projectmanagement_project_earnings' => ['name' => 'projectmanagement_project_earnings', 'type' => 'Serializable', 'internal' => 'earnings'],
|
'projectmanagement_project_budgetcosts' => ['name' => 'projectmanagement_project_budgetcosts', 'type' => 'Serializable', 'internal' => 'budgetCosts'],
|
||||||
'projectmanagement_project_start' => ['name' => 'projectmanagement_project_start', 'type' => 'DateTime', 'internal' => 'start'],
|
'projectmanagement_project_budgetearnings' => ['name' => 'projectmanagement_project_budgetearnings', 'type' => 'Serializable', 'internal' => 'budgetEarnings'],
|
||||||
'projectmanagement_project_end' => ['name' => 'projectmanagement_project_end', 'type' => 'DateTime', 'internal' => 'end'],
|
'projectmanagement_project_earnings' => ['name' => 'projectmanagement_project_earnings', 'type' => 'Serializable', 'internal' => 'earnings'],
|
||||||
'projectmanagement_project_progress' => ['name' => 'projectmanagement_project_progress', 'type' => 'int', 'internal' => 'progress'],
|
'projectmanagement_project_start' => ['name' => 'projectmanagement_project_start', 'type' => 'DateTime', 'internal' => 'start'],
|
||||||
'projectmanagement_project_progress_type' => ['name' => 'projectmanagement_project_progress_type', 'type' => 'int', 'internal' => 'progressType'],
|
'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_endestimated' => ['name' => 'projectmanagement_project_endestimated', 'type' => 'DateTime', 'internal' => 'endEstimated'],
|
||||||
'projectmanagement_project_created_at' => ['name' => 'projectmanagement_project_created_at', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
'projectmanagement_project_progress' => ['name' => 'projectmanagement_project_progress', 'type' => 'int', 'internal' => 'progress'],
|
||||||
|
'projectmanagement_project_progress_type' => ['name' => 'projectmanagement_project_progress_type', 'type' => 'int', 'internal' => 'progressType'],
|
||||||
|
'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'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['Navigation' => [
|
return ['Navigation' => [
|
||||||
'ProjectManagement' => 'Project Management',
|
'ProjectManagement' => 'Project Management',
|
||||||
]];
|
]];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,5 +10,7 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
$MODLANG[1] = [
|
$MODLANG[1] = [
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
return ['ProjectManagement' => [
|
return ['ProjectManagement' => [
|
||||||
'Active' => 'Active',
|
'Active' => 'Active',
|
||||||
'Actual' => 'Actual',
|
'Actual' => 'Actual',
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render(); ?>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
|
||||||
$footerView = new \phpOMS\Views\PaginationView($this->app, $this->request, $this->response);
|
$footerView = new \phpOMS\Views\PaginationView($this->app, $this->request, $this->response);
|
||||||
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
$footerView->setTemplate('/Web/Templates/Lists/Footer/PaginationBig');
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php declare(strict_types=1);
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link https://orange-management.org
|
* @link https://orange-management.org
|
||||||
*/
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
$project = $this->getData('project');
|
$project = $this->getData('project');
|
||||||
|
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render(); ?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user