mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-28 10:33:49 +00:00
add closed tasks
- the entity has a new column / property "closed" (boolean) - An event listener in created during container compilation, which listen on tasks status changed - The taskworkflow manager and task workflow definition indicate if the tasks is closed ; - Add list for closed tasks in controller, and change parameter 'date_status' to 'status'; - and change query to allow to filter on closed tasks
This commit is contained in:
28
Resources/migrations/Version20180426093011.php
Normal file
28
Resources/migrations/Version20180426093011.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace Application\Migrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration;
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
/**
|
||||
* Add a column 'closed' on tasks
|
||||
*/
|
||||
class Version20180426093011 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_task.single_task ADD closed BOOLEAN DEFAULT \'false\' NOT NULL');
|
||||
$this->addSql('ALTER TABLE chill_task.recurring_task ADD closed BOOLEAN DEFAULT \'false\' NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \'postgresql\'.');
|
||||
|
||||
$this->addSql('ALTER TABLE chill_task.recurring_task DROP closed');
|
||||
$this->addSql('ALTER TABLE chill_task.single_task DROP closed');
|
||||
}
|
||||
}
|
@@ -100,7 +100,7 @@
|
||||
{% else %}
|
||||
<ul class="record_actions">
|
||||
<li>
|
||||
<a href="{{ path('chill_task_task_list_by_person', {'personId': person.id, 'date_status' : [ status ] }) }}" class="sc-button bt-cancel">
|
||||
<a href="{{ path('chill_task_task_list_by_person', {'personId': person.id, 'status' : [ status ] }) }}" class="sc-button bt-cancel">
|
||||
{{ 'See more' | trans }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -132,6 +132,10 @@
|
||||
{% if single_task_not_started_tasks is defined %}
|
||||
{{ helper.date_status('Tasks not started', single_task_not_started_tasks, single_task_not_started_count, single_task_not_started_paginator, 'not_started', isSingleStatus, person) }}
|
||||
{% endif %}
|
||||
|
||||
{% if single_task_closed_tasks is defined %}
|
||||
{{ helper.date_status('Closed', single_task_closed_tasks, single_task_closed_count, single_task_closed_paginator, 'closed', isSingleStatus, person) }}
|
||||
{% endif %}
|
||||
|
||||
{% if isSingleStatus == false %}
|
||||
<ul class="record_actions">
|
||||
|
Reference in New Issue
Block a user