1
0
Fork 0
mirror of https://github.com/s-frick/effigenix.git synced 2026-03-28 19:10:22 +01:00

feat(production): articleId für Rezepte, TUI-Verbesserungen mit UoM-Carousel, ArticlePicker und Zutaten-Reorder

Backend:
- articleId als Pflichtfeld im Recipe-Aggregate (Domain, Application, Infrastructure)
- Liquibase-Migration 015 mit defaultValue für bestehende Daten
- Alle Tests angepasst (Unit, Integration)

Frontend:
- UoM-Carousel-Selektor in RecipeCreateScreen, AddBatchScreen, AddIngredientScreen
- ArticlePicker-Komponente mit Typeahead-Suche für Artikelauswahl
- Auto-Position bei Zutatenzugabe (kein manuelles Feld mehr)
- Automatische subRecipeId-Erkennung bei Artikelauswahl
- Zutaten-Reorder per Drag im RecipeDetailScreen (Remove + Re-Add)
- Artikelnamen statt UUIDs in der Rezept-Detailansicht
- Navigation-Context: replace()-Methode ergänzt
This commit is contained in:
Sebastian Frick 2026-02-20 01:07:32 +01:00
parent b46495e1aa
commit 6c1e6c24bc
48 changed files with 999 additions and 237 deletions

View file

@ -51,6 +51,7 @@ interface NavigationState {
type NavigationAction =
| { type: 'NAVIGATE'; screen: Screen; params?: Record<string, string> }
| { type: 'REPLACE'; screen: Screen; params?: Record<string, string> }
| { type: 'BACK' };
function navigationReducer(state: NavigationState, action: NavigationAction): NavigationState {
@ -61,6 +62,12 @@ function navigationReducer(state: NavigationState, action: NavigationAction): Na
history: [...state.history, state.current],
params: action.params ?? {},
};
case 'REPLACE':
return {
current: action.screen,
history: state.history,
params: action.params ?? {},
};
case 'BACK': {
const history = [...state.history];
const previous = history.pop();
@ -75,6 +82,7 @@ interface NavigationContextValue {
params: Record<string, string>;
canGoBack: boolean;
navigate: (screen: Screen, params?: Record<string, string>) => void;
replace: (screen: Screen, params?: Record<string, string>) => void;
back: () => void;
}
@ -97,6 +105,7 @@ export function NavigationProvider({ children, initialScreen = 'login' }: Naviga
params: state.params,
canGoBack: state.history.length > 0,
navigate: (screen, params) => dispatch({ type: 'NAVIGATE', screen, params: params ?? {} }),
replace: (screen, params) => dispatch({ type: 'REPLACE', screen, params: params ?? {} }),
back: () => dispatch({ type: 'BACK' }),
};