-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from dexterity42/development
Update for Release 2.0.0
- Loading branch information
Showing
20 changed files
with
677 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
/** | ||
* This file is part of the SharedProjectTimesheetsBundle for Kimai 2. | ||
* All rights reserved by Fabian Vetter (https://vettersolutions.de). | ||
* | ||
* For the full copyright and license information, please view the LICENSE file | ||
* that was distributed with this source code. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace KimaiPlugin\SharedProjectTimesheetsBundle\Migrations; | ||
|
||
use Doctrine\DBAL\Schema\Schema; | ||
use Doctrine\DBAL\Types\Types; | ||
use Doctrine\Migrations\AbstractMigration; | ||
|
||
final class Version2020122010000 extends AbstractMigration | ||
{ | ||
public function getDescription(): string | ||
{ | ||
return "Add flags to enable charts of shared project timesheets"; | ||
} | ||
|
||
public function up(Schema $schema): void | ||
{ | ||
if ($schema->hasTable(Version2020120600000::SHARED_PROJECT_TIMESHEETS_TABLE_NAME)) { | ||
$table = $schema->getTable(Version2020120600000::SHARED_PROJECT_TIMESHEETS_TABLE_NAME); | ||
|
||
$table->addColumn('annual_chart_visible', Types::BOOLEAN, ['default' => false, 'notnull' => true]); | ||
$table->addColumn('monthly_chart_visible', Types::BOOLEAN, ['default' => false, 'notnull' => true]); | ||
} | ||
} | ||
|
||
public function down(Schema $schema): void | ||
{ | ||
if ($schema->hasTable(Version2020120600000::SHARED_PROJECT_TIMESHEETS_TABLE_NAME)) { | ||
$table = $schema->getTable(Version2020120600000::SHARED_PROJECT_TIMESHEETS_TABLE_NAME); | ||
|
||
$table->dropColumn('annual_chart_visible'); | ||
$table->dropColumn('monthly_chart_visible'); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
/* | ||
* This file is part of the SharedProjectTimesheetsBundle for Kimai 2. | ||
* All rights reserved by Fabian Vetter (https://vettersolutions.de). | ||
* | ||
* For the full copyright and license information, please view the LICENSE file | ||
* that was distributed with this source code. | ||
*/ | ||
|
||
namespace KimaiPlugin\SharedProjectTimesheetsBundle\Model; | ||
|
||
|
||
class ChartStat | ||
{ | ||
|
||
/** | ||
* @var array | ||
*/ | ||
private $duration; | ||
|
||
/** | ||
* @var array | ||
*/ | ||
private $rate; | ||
|
||
public function __construct(?array $resultRow = null) | ||
{ | ||
$this->duration = $resultRow !== null && isset($resultRow['duration']) ? $resultRow['duration'] : 0; | ||
$this->rate = $resultRow !== null && isset($resultRow['rate']) ? $resultRow['rate'] : 0; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getDuration() | ||
{ | ||
return $this->duration; | ||
} | ||
|
||
/** | ||
* @return mixed | ||
*/ | ||
public function getRate() | ||
{ | ||
return $this->rate; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.