refacto(F1.1) : wire [id].vue to use extracted modules and fix TS errors

Wire machine/[id].vue to import from extracted utility modules
(customFieldUtils, productDisplayUtils, useMachineHierarchy, useMachinePrint).
Remove ~1400 LOC of inline functions replaced by imports.
Fix TypeScript errors in extracted composables (AnyRecord/ConstructeurSummary
boundary casts, Map generics, optional chaining on unknown).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-02-04 08:58:42 +01:00
parent 649f8ca9cc
commit 1f2d6c78e8
3 changed files with 93 additions and 1405 deletions

View File

@@ -88,7 +88,8 @@ export function useMachinePrint() {
) => {
if (typeof window === 'undefined') return
const context = buildMachinePrintContext({
// machineReport.js has no type annotations; cast to avoid inferred never[] params
const context = (buildMachinePrintContext as unknown as (config: Record<string, unknown>) => Record<string, unknown>)({
machine,
machineName,
machineReference,