mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Feature: takes activity into account for AccompanyingPeriodInfo
This commit is contained in:
parent
f3e0302f3f
commit
97b7ff2e43
@ -0,0 +1,64 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Chill is a software for social workers
|
||||||
|
*
|
||||||
|
* For the full copyright and license information, please view
|
||||||
|
* the LICENSE file that was distributed with this source code.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace Chill\ActivityBundle\Service\EntityInfo\AccompanyingPeriodInfoQueryPart;
|
||||||
|
|
||||||
|
use Chill\ActivityBundle\Entity\Activity;
|
||||||
|
use Chill\PersonBundle\Service\EntityInfo\AccompanyingPeriodInfoUnionQueryPartInterface;
|
||||||
|
|
||||||
|
class ActivityUsersDateQueryPartForAccompanyingPeriodInfo implements AccompanyingPeriodInfoUnionQueryPartInterface
|
||||||
|
{
|
||||||
|
public function getAccompanyingPeriodIdColumn(): string
|
||||||
|
{
|
||||||
|
return 'activity.accompanyingperiod_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRelatedEntityColumn(): string
|
||||||
|
{
|
||||||
|
return Activity::class;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getRelatedEntityIdColumn(): string
|
||||||
|
{
|
||||||
|
return 'activity.id';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUserIdColumn(): string
|
||||||
|
{
|
||||||
|
return 'au.user_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDateTimeColumn(): string
|
||||||
|
{
|
||||||
|
return 'activity.date';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDiscriminator(): string
|
||||||
|
{
|
||||||
|
return 'activity_date';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getMetadataColumn(): string
|
||||||
|
{
|
||||||
|
return '\'{}\'::jsonb';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFromStatement(): string
|
||||||
|
{
|
||||||
|
return 'activity
|
||||||
|
LEFT JOIN activity_user au on activity.id = au.activity_id';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getWhereClause(): string
|
||||||
|
{
|
||||||
|
return 'activity.accompanyingperiod_id IS NOT NULL';
|
||||||
|
}
|
||||||
|
}
|
@ -34,6 +34,7 @@ services:
|
|||||||
resource: '../Validator/Constraints/'
|
resource: '../Validator/Constraints/'
|
||||||
|
|
||||||
Chill\ActivityBundle\Service\DocGenerator\:
|
Chill\ActivityBundle\Service\DocGenerator\:
|
||||||
autowire: true
|
|
||||||
autoconfigure: true
|
|
||||||
resource: '../Service/DocGenerator/'
|
resource: '../Service/DocGenerator/'
|
||||||
|
|
||||||
|
Chill\ActivityBundle\Service\EntityInfo\:
|
||||||
|
resource: '../Service/EntityInfo/'
|
||||||
|
@ -109,6 +109,15 @@ class AccompanyingPeriod implements
|
|||||||
*/
|
*/
|
||||||
public const STEP_CONFIRMED = 'CONFIRMED';
|
public const STEP_CONFIRMED = 'CONFIRMED';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark an accompanying period as confirmed, but inactive
|
||||||
|
*
|
||||||
|
* this means that the accompanying period **is**
|
||||||
|
* confirmed, but no activity (Activity, AccompanyingPeriod, ...)
|
||||||
|
* has been associated, or updated, within this accompanying period.
|
||||||
|
*/
|
||||||
|
public const STEP_CONFIRMED_INACTIVE = 'CONFIRMED_INACTIVE';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mark an accompanying period as "draft".
|
* Mark an accompanying period as "draft".
|
||||||
*
|
*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user