Skip to content

Commit 6b1a235

Browse files
committed
chore(admin): use stats barrel import + apply biome formatting
Address post-implementation audit findings: import schemas and output types from the `~/modules/admin/stats` barrel in the adminStats router instead of reaching into the internal `./schemas` / `./types` files, then re-run biome to normalise two minor whitespace deltas.
1 parent c17ea1d commit 6b1a235

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

packages/app/src/modules/admin/stats/ConformiteStatsPage.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
"use client";
22

33
import { type ChangeEvent, useState } from "react";
4-
5-
import { formatCount, formatGap } from "~/modules/domain";
64
import type { CompanySizeRange } from "~/modules/domain";
5+
import { formatCount, formatGap } from "~/modules/domain";
76
import {
87
CompanySizeFilter,
9-
NafSectorFilter,
108
type NafSectionCode,
9+
NafSectorFilter,
1110
} from "~/modules/shared";
1211
import { api } from "~/trpc/react";
1312

@@ -76,10 +75,7 @@ export function ConformiteStatsPage({ currentYear, availableYears }: Props) {
7675
/>
7776
</div>
7877
<div className="fr-col-12 fr-col-md-4">
79-
<NafSectorFilter
80-
onChange={setNafCodePrefix}
81-
value={nafCodePrefix}
82-
/>
78+
<NafSectorFilter onChange={setNafCodePrefix} value={nafCodePrefix} />
8379
</div>
8480
</div>
8581

packages/app/src/modules/shared/__tests__/NafSectorFilter.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ describe("NafSectorFilter", () => {
4444
render(<NafSectorFilter onChange={vi.fn()} value={undefined} />);
4545

4646
expect(
47-
screen.getByRole("option", { name: /^J Information et communication$/ }),
47+
screen.getByRole("option", {
48+
name: /^J Information et communication$/,
49+
}),
4850
).toBeInTheDocument();
4951
});
5052

packages/app/src/server/api/routers/adminStats.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import {
1010
sql,
1111
} from "drizzle-orm";
1212

13-
import {
14-
getCampaignProgressionSchema,
15-
getGapAlertRateSchema,
16-
} from "~/modules/admin/stats/schemas";
1713
import type {
1814
CampaignProgressionPoint,
1915
CampaignProgressionSeries,
2016
GapAlertRateResult,
21-
} from "~/modules/admin/stats/types";
17+
} from "~/modules/admin/stats";
18+
import {
19+
getCampaignProgressionSchema,
20+
getGapAlertRateSchema,
21+
} from "~/modules/admin/stats";
2222
import { COMPANY_SIZE_RANGES } from "~/modules/domain";
2323
import { adminProcedure, createTRPCRouter } from "~/server/api/trpc";
2424
import type { DB } from "~/server/db";

0 commit comments

Comments
 (0)