refactor(web): extract ResourcesClient types + inline components, fix test TS errors

Extract types.ts, FilterDropdown.tsx, BooleanBadge.tsx from
ResourcesClient.tsx into resource-client/ subdirectory.
ResourcesClient reduced from 1,613 to 1,507 lines.

Fix TypeScript strict mode errors across 8 test files:
- Add id/order to BlueprintFieldDefinition test objects
- Use FieldType enum instead of string literals in useFilters
- Add non-null assertions for mock.calls array access
- Type ScrollDiv for jsdom scrollLeft workaround
- Fix exactOptionalPropertyTypes violations

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-10 22:40:24 +02:00
parent dcac9952ca
commit d3f721ce58
13 changed files with 217 additions and 162 deletions
+3 -5
View File
@@ -48,9 +48,9 @@ describe("getPlanningEntryMutationId", () => {
it("returns sourceAllocationId when entityId is undefined", () => {
const result = getPlanningEntryMutationId({
id: "id-1",
entityId: undefined,
entityId: undefined as string | undefined,
sourceAllocationId: "alloc-1",
});
} as Parameters<typeof getPlanningEntryMutationId>[0]);
expect(result).toBe("alloc-1");
});
@@ -78,9 +78,7 @@ describe("getPlanningEntryMutationId", () => {
it("returns id when both entityId and sourceAllocationId are undefined", () => {
const result = getPlanningEntryMutationId({
id: "id-1",
entityId: undefined,
sourceAllocationId: undefined,
});
} as Parameters<typeof getPlanningEntryMutationId>[0]);
expect(result).toBe("id-1");
});