Skip to content

Commit

Permalink
Merge pull request #2308 from MTES-MCT/fix/2288-public-stats-pris-en-…
Browse files Browse the repository at this point in the history
…charge

[FO - Statistiques] Modification du calcul du % de pris en charge dans les stats publiques
  • Loading branch information
numew committed Mar 5, 2024
2 parents 7175872 + 12da994 commit 1a27779
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<template #title>territoires déployés</template>
</TheHistoFrontStatsDetailsItem>
<TheHistoFrontStatsDetailsItem :data="strPercentValidated">
<template #title>taux de prise en charge</template>
<template #title>taux de dossiers traités ou en cours de traitement</template>
</TheHistoFrontStatsDetailsItem>
<TheHistoFrontStatsDetailsItem :data="strPercentClosed">
<template #title>taux de clôture des signalements</template>
Expand Down
10 changes: 7 additions & 3 deletions src/Repository/SignalementRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ public function findAllWithGeoData(?User $user, array $options, int $offset): ar
return $qb->getQuery()->getArrayResult();
}

public function countAll(?Territory $territory, ?Partner $partner, bool $removeImported = false, bool $removeArchived = false): int
{
public function countAll(
?Territory $territory,
?Partner $partner,
bool $removeImported = false,
bool $removeArchived = false
): int {
$qb = $this->createQueryBuilder('s');
$qb->select('COUNT(s.id)');

Expand Down Expand Up @@ -162,7 +166,7 @@ public function countByStatus(?Territory $territory, ?Partner $partner, ?int $ye

public function countValidated(bool $removeImported = false): int
{
$notStatus = [Signalement::STATUS_NEED_VALIDATION, Signalement::STATUS_REFUSED, Signalement::STATUS_ARCHIVED];
$notStatus = [Signalement::STATUS_NEED_VALIDATION, Signalement::STATUS_ARCHIVED];
$qb = $this->createQueryBuilder('s');
$qb->select('COUNT(s.id)');
$qb->andWhere('s.statut NOT IN (:notStatus)')
Expand Down
2 changes: 1 addition & 1 deletion templates/front/index.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@
<h3 class="fr-card__title fr-h1 fr-text-title--blue-france">
{{ stats.pris_en_compte }} %
</h3>
<p class="fr-card__desc fr-text--lg">des signalements pris en charge</p>
<p class="fr-card__desc fr-text--lg">des signalements traités ou en cours de traitement</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 1a27779

Please sign in to comment.