From e5c361fe425b246b952d292aee73a3ec9e05b6dc Mon Sep 17 00:00:00 2001 From: Marcel Raddatz Date: Fri, 10 Apr 2026 14:13:55 +0200 Subject: [PATCH] refactor(planner): import shared types in reasoningTags instead of re-declaring Removes local TagItem, Recipe, SlotRecipe, Slot, SlotMap definitions and imports Recipe, Slot, SlotMap from types.ts. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/lib/planner/reasoningTags.ts | 29 ++--------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/frontend/src/lib/planner/reasoningTags.ts b/frontend/src/lib/planner/reasoningTags.ts index e0a5c09..b14fbad 100644 --- a/frontend/src/lib/planner/reasoningTags.ts +++ b/frontend/src/lib/planner/reasoningTags.ts @@ -1,36 +1,11 @@ +import type { Recipe, Slot, SlotMap } from '$lib/planner/types'; + export interface ReasoningTag { id: 'neues-protein' | 'aufwand-leicht'; label: string; color: 'green' | 'yellow'; } -interface TagItem { - id?: string; - name?: string; - tagType?: string; -} - -interface Recipe { - id: string; - name: string; - cookTimeMin?: number; - effort?: string; - tags?: TagItem[]; -} - -interface SlotRecipe { - id?: string; - tags?: TagItem[]; -} - -interface Slot { - id?: string; - slotDate?: string; - recipe?: SlotRecipe | null; -} - -type SlotMap = Record; - export function computeReasoningTags(slotMap: SlotMap, recipe: Recipe): ReasoningTag[] { const tags: ReasoningTag[] = [];