Skip to content

Commit

Permalink
Merge pull request #3415 from MTES-MCT/hotfix/3412-undefined-doublon
Browse files Browse the repository at this point in the history
[BO - Statistiques] Correction d'initialisation du graphique avec les motifs de refus depuis l'ajout de DOUBLON
  • Loading branch information
hmeneuvrier authored Dec 10, 2024
2 parents 90be4b8 + b8498a5 commit 6a8edb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default defineComponent({
},
height: {
type: Number,
default: 400
default: 550
},
cssClasses: {
type: String,
Expand Down
5 changes: 5 additions & 0 deletions src/Service/Statistics/MotifClotureStatisticProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,11 @@ private static function initMotifPerValue(): array
'color' => '#FC5D00',
'count' => 0,
],
'DOUBLON' => [
'label' => 'Doublon',
'color' => '#CECE00',
'count' => 0,
],
'AUTRE' => [
'label' => 'Autre',
'color' => '#CECECE',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function testGetDataDoughnut(): void
$signalementRepository = self::getContainer()->get(SignalementRepository::class);
$data = (new MotifClotureStatisticProvider($signalementRepository))->getData(null, null);

$this->assertEquals(14, \count($data));
$this->assertEquals(15, \count($data));
$this->assertArrayHasKey('TRAVAUX_FAITS_OU_EN_COURS', $data);
$this->assertArrayHasKey('color', $data['TRAVAUX_FAITS_OU_EN_COURS']);
$this->assertArrayHasKey('label', $data['TRAVAUX_FAITS_OU_EN_COURS']);
Expand Down

0 comments on commit 6a8edb1

Please sign in to comment.