Skip to content

Commit

Permalink
[Préavis] Corrige le comptage des signalements sur la liste et la lar…
Browse files Browse the repository at this point in the history
…geur de la fiche (#3236)

## Linked issues

- #2843
- #2867

----

- [ ] Tests E2E (Cypress)
  • Loading branch information
ivangabriele authored May 29, 2024
2 parents 055dd3e + 66a687f commit 1d18e58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,19 @@ interface DBLogbookReportRepository :
COUNT(r.id) AS reporting_count
FROM distinct_cfrs dc
LEFT JOIN reportings r ON dc.cfr = r.internal_reference_number
WHERE
r.type = 'INFRACTION_SUSPICION'
AND r.archived = FALSE
AND r.deleted = FALSE
GROUP BY cfr
),
dat_and_cor_logbook_reports_with_extra_columns_and_reporting_count AS (
SELECT
daclr.*,
cfr_reporting_counts.reporting_count
COALESCE(crc.reporting_count, 0) AS reporting_count
FROM dat_and_cor_logbook_reports_with_extra_columns daclr
LEFT JOIN cfr_reporting_counts ON daclr.cfr = cfr_reporting_counts.cfr
LEFT JOIN cfr_reporting_counts crc ON daclr.cfr = crc.cfr
),
dat_and_cor_logbook_reports AS (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const Card = styled.div`
display: flex;
flex-direction: column;
height: 100%;
width: 544px;
width: 560px;
`

const Body = styled.div`
Expand Down

0 comments on commit 1d18e58

Please sign in to comment.