mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 13:24:25 +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(
|
return array(
|
||||||
'id' => $metadata->getColumnName('id'),
|
'id' => $metadata->getColumnName('id'),
|
||||||
'date' => $metadata->getColumnName('openingDate'),
|
|
||||||
'FROM' => $metadata->getTableName(),
|
'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 = $this->basicFetchQuery($context, $args);
|
||||||
|
|
||||||
$data['type'] = 'accompanying_period_closing';
|
$data['type'] = 'accompanying_period_closing';
|
||||||
$data['WHERE'] = sprintf('%s = %d AND %s IS NOT NULL',
|
$data['date'] = $metadata->getColumnName('closingDate');
|
||||||
$metadata
|
|
||||||
->getAssociationMapping('person')['joinColumns'][0]['name'],
|
|
||||||
$args['person']->getId(),
|
|
||||||
$metadata
|
|
||||||
->getColumnName('closingDate')
|
|
||||||
);
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,15 +45,13 @@ class TimelineAccompanyingPeriodOpening extends AbstractTimelineAccompanyingPeri
|
|||||||
*/
|
*/
|
||||||
public function fetchQuery($context, array $args)
|
public function fetchQuery($context, array $args)
|
||||||
{
|
{
|
||||||
|
$metadata = $this->em
|
||||||
|
->getClassMetadata('ChillPersonBundle:AccompanyingPeriod');
|
||||||
|
|
||||||
$data = $this->basicFetchQuery($context, $args);
|
$data = $this->basicFetchQuery($context, $args);
|
||||||
|
|
||||||
$data['type'] = 'accompanying_period_opening';
|
$data['type'] = 'accompanying_period_opening';
|
||||||
$data['WHERE'] = sprintf('%s = %d',
|
$data['date'] = $metadata->getColumnName('openingDate');
|
||||||
$this->em
|
|
||||||
->getClassMetadata('ChillPersonBundle:AccompanyingPeriod')
|
|
||||||
->getAssociationMapping('person')['joinColumns'][0]['name'],
|
|
||||||
$args['person']->getId());
|
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user