Loading module/Oscar/src/Oscar/Controller/ProjectGrantController.php +1 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif /** Export les données en CSV. */ public function csvAction() { /** @var Request $request */ $request = $this->getRequest(); Loading module/Oscar/src/Oscar/Strategy/Activity/ExportDatas.php +9 −5 Original line number Diff line number Diff line Loading @@ -33,16 +33,22 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic { use UseOscarConfigurationServiceTrait, UseProjectGrantServiceTrait, UseEntityManagerTrait, UseOscarUserContextServiceTrait; private ?string $rewriteDateFormat = null; /** * ExportDatas constructor. */ public function __construct( ProjectGrantService $pgs, OscarUserContext $ouc) public function __construct( ProjectGrantService $pgs, OscarUserContext $ouc, ?string $rewriteDateFormat = null) { $this->setProjectGrantService($pgs); $this->setOscarConfigurationService($pgs->getOscarConfigurationService()); $this->setEntityManager($pgs->getEntityManager()); $this->setOscarUserContextService($ouc); if( $rewriteDateFormat === null ){ $this->rewriteDateFormat = $this->getOscarConfigurationService()->getExportDateFormat(); } else { $this->rewriteDateFormat = $rewriteDateFormat; } } public function output( $paramID, $fields = null, $perimeter = null ){ Loading @@ -51,7 +57,7 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic $separator = $this->getOscarConfigurationService()->getExportSeparator(); // Format des dates $dateFormat = 'Y-m-d'; // $this->getOscarConfigurationService()->getExportDateFormat(); $dateFormat = $this->rewriteDateFormat; $parameters = []; Loading Loading @@ -227,9 +233,7 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic $jalonKey = $mil->getType()->getLabel(); $jalonsCurrent[$jalonKey][] = $mil->getDateStart() ? $mil->getDateStart()->format($dateFormat) : ''; $jalonsCurrent[$jalonKey][] = $mil->getDateStartStr($dateFormat); if( array_key_exists($jalonKey, $jalonsFaitCurrent) ){ // Calcule de l'état du jalon Loading Loading
module/Oscar/src/Oscar/Controller/ProjectGrantController.php +1 −0 Original line number Diff line number Diff line Loading @@ -1165,6 +1165,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif /** Export les données en CSV. */ public function csvAction() { /** @var Request $request */ $request = $this->getRequest(); Loading
module/Oscar/src/Oscar/Strategy/Activity/ExportDatas.php +9 −5 Original line number Diff line number Diff line Loading @@ -33,16 +33,22 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic { use UseOscarConfigurationServiceTrait, UseProjectGrantServiceTrait, UseEntityManagerTrait, UseOscarUserContextServiceTrait; private ?string $rewriteDateFormat = null; /** * ExportDatas constructor. */ public function __construct( ProjectGrantService $pgs, OscarUserContext $ouc) public function __construct( ProjectGrantService $pgs, OscarUserContext $ouc, ?string $rewriteDateFormat = null) { $this->setProjectGrantService($pgs); $this->setOscarConfigurationService($pgs->getOscarConfigurationService()); $this->setEntityManager($pgs->getEntityManager()); $this->setOscarUserContextService($ouc); if( $rewriteDateFormat === null ){ $this->rewriteDateFormat = $this->getOscarConfigurationService()->getExportDateFormat(); } else { $this->rewriteDateFormat = $rewriteDateFormat; } } public function output( $paramID, $fields = null, $perimeter = null ){ Loading @@ -51,7 +57,7 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic $separator = $this->getOscarConfigurationService()->getExportSeparator(); // Format des dates $dateFormat = 'Y-m-d'; // $this->getOscarConfigurationService()->getExportDateFormat(); $dateFormat = $this->rewriteDateFormat; $parameters = []; Loading Loading @@ -227,9 +233,7 @@ class ExportDatas implements UseOscarConfigurationService, UseProjectGrantServic $jalonKey = $mil->getType()->getLabel(); $jalonsCurrent[$jalonKey][] = $mil->getDateStart() ? $mil->getDateStart()->format($dateFormat) : ''; $jalonsCurrent[$jalonKey][] = $mil->getDateStartStr($dateFormat); if( array_key_exists($jalonKey, $jalonsFaitCurrent) ){ // Calcule de l'état du jalon Loading