feat(machine) : add entity history section to machine detail page

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Matthieu
2026-03-24 23:31:25 +01:00
parent a72279f978
commit 9e1504ddb7
2 changed files with 28 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ export type EntityHistoryEntry = {
}
const ENTITY_ENDPOINTS: Record<string, string> = {
machine: '/machines',
composant: '/composants',
piece: '/pieces',
product: '/products',
@@ -35,7 +36,7 @@ const extractItems = (payload: any): EntityHistoryEntry[] => {
return []
}
export function useEntityHistory(entityType: 'composant' | 'piece' | 'product') {
export function useEntityHistory(entityType: 'machine' | 'composant' | 'piece' | 'product') {
const { get } = useApi()
const basePath = ENTITY_ENDPOINTS[entityType]