feat: adapt recipe surfaces for batch-cook sessions

- Recipes page action buttons reordered/restyled to push AI generation
  and batch cooking ahead of manual recipe creation.
- Recipe detail page hides meal/drink pairing (doesn't make sense for
  a multi-dish batch session).
- Print pages force light mode regardless of app theme (dark bg +
  hardcoded dark text was unreadable) and render sectioned steps +
  dishes/storage for batch-cook recipes.
- Markdown export mirrors the same sectioned structure.
- Cooking mode tags each step with which dish(es) it belongs to.
- Meal planner: mealPlanEntries.batchDishId lets a slot point at one
  specific dish within a batch session; picking a batch-cook recipe
  now prompts for which dish, and the grid shows the dish name.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Arnaud
2026-07-12 02:32:57 +02:00
parent 8e83cc0dc7
commit ba1614073b
16 changed files with 4867 additions and 36 deletions
@@ -0,0 +1,2 @@
ALTER TABLE "meal_plan_entries" ADD COLUMN "batch_dish_id" text;--> statement-breakpoint
ALTER TABLE "meal_plan_entries" ADD CONSTRAINT "meal_plan_entries_batch_dish_id_recipe_batch_dishes_id_fk" FOREIGN KEY ("batch_dish_id") REFERENCES "public"."recipe_batch_dishes"("id") ON DELETE set null ON UPDATE no action;
File diff suppressed because it is too large Load Diff
@@ -211,6 +211,13 @@
"when": 1783810665920,
"tag": "0029_tired_crystal",
"breakpoints": true
},
{
"idx": 30,
"version": "7",
"when": 1783814978348,
"tag": "0030_kind_lightspeed",
"breakpoints": true
}
]
}
+3 -1
View File
@@ -12,7 +12,7 @@ import {
} from "drizzle-orm/pg-core";
import { relations } from "drizzle-orm";
import { users } from "./users";
import { recipes } from "./recipes";
import { recipes, recipeBatchDishes } from "./recipes";
import { ingredients } from "./recipes";
import { collectionMemberRoleEnum } from "./social";
@@ -35,6 +35,7 @@ export const mealPlanEntries = pgTable("meal_plan_entries", {
day: weekdayEnum("day").notNull(),
mealType: mealTypeEnum("meal_type").notNull(),
recipeId: text("recipe_id").references(() => recipes.id, { onDelete: "set null" }),
batchDishId: text("batch_dish_id").references(() => recipeBatchDishes.id, { onDelete: "set null" }),
servings: integer("servings").notNull().default(2),
note: text("note"),
}, (t) => [
@@ -107,6 +108,7 @@ export const mealPlansRelations = relations(mealPlans, ({ one, many }) => ({
export const mealPlanEntriesRelations = relations(mealPlanEntries, ({ one }) => ({
mealPlan: one(mealPlans, { fields: [mealPlanEntries.mealPlanId], references: [mealPlans.id] }),
recipe: one(recipes, { fields: [mealPlanEntries.recipeId], references: [recipes.id] }),
batchDish: one(recipeBatchDishes, { fields: [mealPlanEntries.batchDishId], references: [recipeBatchDishes.id] }),
}));
export const mealPlanMembersRelations = relations(mealPlanMembers, ({ one }) => ({