Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/import-2023' into preprod
Browse files Browse the repository at this point in the history
  • Loading branch information
BenoitLeveque committed Jan 14, 2024
2 parents efb2fd3 + a08d0eb commit 9e29484
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
4 changes: 2 additions & 2 deletions src/Campaign/ResponseFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public function createResponse(array $data, Campaign $campaign): Response
$enumClass = $this->enums->getEnums($enum['class']);
$enumId = $enumClass->getIdByLabel($data[$enum['key']] ?? null);

if ($enumClass instanceof JobTitleEnums && null === $enumId) {
$enumId = $enumClass->oldChoices[$data[$enum['key']]] ?? null;
if ($enumClass instanceof JobTitleEnums && 0 === $enumId) {
$enumId = $enumClass->oldChoices[$data[$enum['key']]] ?? 0;
}

if ($enumClass instanceof PHPVersionEnums && 'PHP 5.6 ou inférieur' === $data[$enum['key']]) {
Expand Down
22 changes: 11 additions & 11 deletions src/Enums/JobTitleEnums.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class JobTitleEnums extends AbstractEnums
];

public array $oldChoices = [
self::DIRECTEUR => 'Directeur, cadre dirigeant',
self::RESPONSABLE_EQUIPE => "Cadre intermédiaire, responsable d'équipe",
self::CHEF_PROJET => 'Chef de projet',
self::LEAD_DEVELOPPEUR => 'Lead développeur',
self::ARCHITECTE => 'Architecte',
self::CONSULTANT => 'Consultant',
self::FORMATEUR => 'Formateur',
self::DEVELOPPEUR => 'Développeur',
self::SYSADMIN => 'Sysadmin',
self::DEVOPS => 'Devops',
self::AUTRE => 'Autre',
'Directeur, cadre dirigeant' => self::DIRECTEUR,
"Cadre intermédiaire, responsable d'équipe" => self::RESPONSABLE_EQUIPE,
'Chef de projet' => self::CHEF_PROJET,
'Lead développeur' => self::LEAD_DEVELOPPEUR,
'Architecte' => self::ARCHITECTE,
'Consultant' => self::CONSULTANT,
'Formateur' => self::FORMATEUR,
'Développeur' => self::DEVELOPPEUR,
'Sysadmin' => self::SYSADMIN,
'Devops' => self::DEVOPS,
'Autre' => self::AUTRE,
];
}
5 changes: 5 additions & 0 deletions src/Report/WorkMethodReport.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,9 @@ public function execute()

$this->data = $this->queryBuilder->fetchAllAssociative();
}

public function getWeight()
{
return null;
}
}
18 changes: 9 additions & 9 deletions templates/Report/_php_versions_parent.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
(constant('App\\Enums\\PHPVersionEnums::PHP_54')):'#9E9E9E',
(constant('App\\Enums\\PHPVersionEnums::PHP_55')):'#7D7D7D',
(constant('App\\Enums\\PHPVersionEnums::PHP_56')):'#696969',
(constant('App\\Enums\\PHPVersionEnums::PHP_70')):'#A47D7C',
(constant('App\\Enums\\PHPVersionEnums::PHP_71')):'#3D96AE',
(constant('App\\Enums\\PHPVersionEnums::PHP_72')):'#DB843D',
(constant('App\\Enums\\PHPVersionEnums::PHP_73')):'#4C6EAF',
(constant('App\\Enums\\PHPVersionEnums::PHP_74')):'#80699B',
(constant('App\\Enums\\PHPVersionEnums::PHP_80')):'#AA4643',
(constant('App\\Enums\\PHPVersionEnums::PHP_81')):'#3D96AE',
(constant('App\\Enums\\PHPVersionEnums::PHP_82')):'#0000DD',
(constant('App\\Enums\\PHPVersionEnums::PHP_83')):'#00AA00',
(constant('App\\Enums\\PHPVersionEnums::PHP_70')):'#fad390',
(constant('App\\Enums\\PHPVersionEnums::PHP_71')):'#fa983a',
(constant('App\\Enums\\PHPVersionEnums::PHP_72')):'#e55039',
(constant('App\\Enums\\PHPVersionEnums::PHP_73')):'#b71540',
(constant('App\\Enums\\PHPVersionEnums::PHP_74')):'#6a89cc',
(constant('App\\Enums\\PHPVersionEnums::PHP_80')):'#1e3799',
(constant('App\\Enums\\PHPVersionEnums::PHP_81')):'#60a3bc',
(constant('App\\Enums\\PHPVersionEnums::PHP_82')):'#0a3d62',
(constant('App\\Enums\\PHPVersionEnums::PHP_83')):'#78e08f',
}
%}

Expand Down

0 comments on commit 9e29484

Please sign in to comment.