mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix error in date in accompanying period timeline
This commit is contained in:
parent
47e194b1ed
commit
bd50ca44db
@ -83,8 +83,12 @@ abstract class AbstractTimelineAccompanyingPeriod implements TimelineProviderInt
|
||||
|
||||
return array(
|
||||
'id' => $metadata->getColumnName('id'),
|
||||
'date' => $metadata->getColumnName('openingDate'),
|
||||
'FROM' => $metadata->getTableName(),
|
||||
'WHERE' => sprintf('%s = %d',
|
||||
$this->em
|
||||
->getClassMetadata('ChillPersonBundle:AccompanyingPeriod')
|
||||
->getAssociationMapping('person')['joinColumns'][0]['name'],
|
||||
$args['person']->getId())
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -51,14 +51,8 @@ class TimelineAccompanyingPeriodClosing extends AbstractTimelineAccompanyingPeri
|
||||
$data = $this->basicFetchQuery($context, $args);
|
||||
|
||||
$data['type'] = 'accompanying_period_closing';
|
||||
$data['WHERE'] = sprintf('%s = %d AND %s IS NOT NULL',
|
||||
$metadata
|
||||
->getAssociationMapping('person')['joinColumns'][0]['name'],
|
||||
$args['person']->getId(),
|
||||
$metadata
|
||||
->getColumnName('closingDate')
|
||||
);
|
||||
|
||||
$data['date'] = $metadata->getColumnName('closingDate');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
@ -45,15 +45,13 @@ class TimelineAccompanyingPeriodOpening extends AbstractTimelineAccompanyingPeri
|
||||
*/
|
||||
public function fetchQuery($context, array $args)
|
||||
{
|
||||
$metadata = $this->em
|
||||
->getClassMetadata('ChillPersonBundle:AccompanyingPeriod');
|
||||
|
||||
$data = $this->basicFetchQuery($context, $args);
|
||||
|
||||
$data['type'] = 'accompanying_period_opening';
|
||||
$data['WHERE'] = sprintf('%s = %d',
|
||||
$this->em
|
||||
->getClassMetadata('ChillPersonBundle:AccompanyingPeriod')
|
||||
->getAssociationMapping('person')['joinColumns'][0]['name'],
|
||||
$args['person']->getId());
|
||||
$data['date'] = $metadata->getColumnName('openingDate');
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user